初始化供应商,物料类别,物料信息功能
This commit is contained in:
parent
b1cdb266b4
commit
16c617c839
|
@ -166,6 +166,9 @@ public class JeecgController<T, S extends IService<T>> {
|
|||
for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
|
||||
// 获取上传文件对象
|
||||
MultipartFile file = entity.getValue();
|
||||
if(file == null){
|
||||
break;
|
||||
}
|
||||
ImportParams params = new ImportParams();
|
||||
params.setTitleRows(2);
|
||||
params.setHeadRows(1);
|
||||
|
|
|
@ -31,6 +31,12 @@
|
|||
<artifactId>weixin4j</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- 添加汉字转拼音依赖-->
|
||||
<dependency>
|
||||
<groupId>com.belerweb</groupId>
|
||||
<artifactId>pinyin4j</artifactId>
|
||||
<version>2.5.0</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
|
|
|
@ -0,0 +1,201 @@
|
|||
package com.nu.modules.ConfigMaterial.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
import java.io.IOException;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLDecoder;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.system.query.QueryGenerator;
|
||||
import org.jeecg.common.system.query.QueryRuleEnum;
|
||||
import org.jeecg.common.util.oConvertUtils;
|
||||
import com.nu.modules.ConfigMaterial.entity.ConfigMaterialCategory;
|
||||
import com.nu.modules.ConfigMaterial.service.IConfigMaterialCategoryService;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.jeecgframework.poi.excel.ExcelImportUtil;
|
||||
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
||||
import org.jeecgframework.poi.excel.entity.ExportParams;
|
||||
import org.jeecgframework.poi.excel.entity.ImportParams;
|
||||
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
|
||||
import org.jeecg.common.system.base.controller.JeecgController;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
|
||||
/**
|
||||
* @Description: 物料类别
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-03-17
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="物料类别")
|
||||
@RestController
|
||||
@RequestMapping("/ConfigMaterial/configMaterialCategory")
|
||||
@Slf4j
|
||||
public class ConfigMaterialCategoryController extends JeecgController<ConfigMaterialCategory, IConfigMaterialCategoryService> {
|
||||
@Autowired
|
||||
private IConfigMaterialCategoryService configMaterialCategoryService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param configMaterialCategory
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "物料类别-分页列表查询")
|
||||
@ApiOperation(value="物料类别-分页列表查询", notes="物料类别-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<ConfigMaterialCategory>> queryPageList(ConfigMaterialCategory configMaterialCategory,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<ConfigMaterialCategory> queryWrapper = QueryGenerator.initQueryWrapper(configMaterialCategory, req.getParameterMap());
|
||||
Page<ConfigMaterialCategory> page = new Page<ConfigMaterialCategory>(pageNo, pageSize);
|
||||
IPage<ConfigMaterialCategory> pageList = configMaterialCategoryService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value="物料类别-分页列表查询", notes="物料类别-分页列表查询")
|
||||
@GetMapping(value = "/selectMaterialList")
|
||||
public Result<IPage<ConfigMaterialCategory>> selectMaterialList(ConfigMaterialCategory configMaterialCategory,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<ConfigMaterialCategory> queryWrapper = QueryGenerator.initQueryWrapper(configMaterialCategory, req.getParameterMap());
|
||||
Page<ConfigMaterialCategory> page = new Page<ConfigMaterialCategory>(pageNo, pageSize);
|
||||
IPage<ConfigMaterialCategory> pageList = configMaterialCategoryService.selectMaterialList(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param configMaterialCategory
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "物料类别-添加")
|
||||
@ApiOperation(value="物料类别-添加", notes="物料类别-添加")
|
||||
@RequiresPermissions("ConfigMaterial:config_material_category:add")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody ConfigMaterialCategory configMaterialCategory) {
|
||||
configMaterialCategoryService.save(configMaterialCategory);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param configMaterialCategory
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "物料类别-编辑")
|
||||
@ApiOperation(value="物料类别-编辑", notes="物料类别-编辑")
|
||||
@RequiresPermissions("ConfigMaterial:config_material_category:edit")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody ConfigMaterialCategory configMaterialCategory) {
|
||||
configMaterialCategoryService.updateById(configMaterialCategory);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "物料类别-通过id删除")
|
||||
@ApiOperation(value="物料类别-通过id删除", notes="物料类别-通过id删除")
|
||||
@RequiresPermissions("ConfigMaterial:config_material_category:delete")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
configMaterialCategoryService.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "物料类别-批量删除")
|
||||
@ApiOperation(value="物料类别-批量删除", notes="物料类别-批量删除")
|
||||
@RequiresPermissions("ConfigMaterial:config_material_category:deleteBatch")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.configMaterialCategoryService.removeByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "物料类别-通过id查询")
|
||||
@ApiOperation(value="物料类别-通过id查询", notes="物料类别-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<ConfigMaterialCategory> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
ConfigMaterialCategory configMaterialCategory = configMaterialCategoryService.getById(id);
|
||||
if(configMaterialCategory==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(configMaterialCategory);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param configMaterialCategory
|
||||
*/
|
||||
@RequiresPermissions("ConfigMaterial:config_material_category:exportXls")
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, ConfigMaterialCategory configMaterialCategory) {
|
||||
return super.exportXls(request, configMaterialCategory, ConfigMaterialCategory.class, "物料类别");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("ConfigMaterial:config_material_category:importExcel")
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, ConfigMaterialCategory.class);
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value="获取物料分类树", notes="获取物料分类树")
|
||||
@GetMapping(value = "/getMaterialTreeData")
|
||||
public Result<List<Map<String,Object>>> getMaterialTreeData(ConfigMaterialCategory configMaterialCategory) {
|
||||
List<Map<String,Object>> pageList = configMaterialCategoryService.getMaterialTreeData(configMaterialCategory);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,186 @@
|
|||
package com.nu.modules.ConfigMaterial.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.nu.modules.configMaterialInfo.entity.ConfigMaterialInfo;
|
||||
import com.nu.modules.configMaterialInfo.service.IConfigMaterialInfoService;
|
||||
import com.nu.modules.utils.PinyinUtils;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||
import org.jeecg.common.system.base.controller.JeecgController;
|
||||
import org.jeecg.common.system.query.QueryGenerator;
|
||||
import org.jeecg.common.system.query.QueryRuleEnum;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Description: 物料信息
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-03-13
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="物料信息")
|
||||
@RestController
|
||||
@RequestMapping("/configMaterialInfo/configMaterialInfo")
|
||||
@Slf4j
|
||||
public class ConfigMaterialInfoController extends JeecgController<ConfigMaterialInfo, IConfigMaterialInfoService> {
|
||||
@Autowired
|
||||
private IConfigMaterialInfoService configMaterialInfoService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param configMaterialInfo
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "物料信息-分页列表查询")
|
||||
@ApiOperation(value="物料信息-分页列表查询", notes="物料信息-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<ConfigMaterialInfo>> queryPageList(ConfigMaterialInfo configMaterialInfo,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
// 自定义查询规则
|
||||
Map<String, QueryRuleEnum> customeRuleMap = new HashMap<>();
|
||||
// 自定义多选的查询规则为:LIKE_WITH_OR
|
||||
// customeRuleMap.put("categoryId", QueryRuleEnum.LIKE_WITH_OR);
|
||||
// customeRuleMap.put("typeId", QueryRuleEnum.LIKE_WITH_OR);
|
||||
// customeRuleMap.put("medicationId", QueryRuleEnum.LIKE_WITH_OR);
|
||||
// customeRuleMap.put("izEnabled", QueryRuleEnum.LIKE_WITH_OR);
|
||||
|
||||
QueryWrapper<ConfigMaterialInfo> queryWrapper = QueryGenerator.initQueryWrapper(configMaterialInfo, req.getParameterMap(),customeRuleMap);
|
||||
if(StringUtils.isNotBlank(configMaterialInfo.getTreeId())){
|
||||
queryWrapper.apply(" (category_id = '"+configMaterialInfo.getTreeId()+"' or type_id = '"+configMaterialInfo.getTreeId()+"' or medication_id = '"+configMaterialInfo.getTreeId()+"' )");
|
||||
}
|
||||
Page<ConfigMaterialInfo> page = new Page<ConfigMaterialInfo>(pageNo, pageSize);
|
||||
IPage<ConfigMaterialInfo> pageList = configMaterialInfoService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param configMaterialInfo
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "物料信息-添加")
|
||||
@ApiOperation(value="物料信息-添加", notes="物料信息-添加")
|
||||
@RequiresPermissions("configMaterialInfo:config_material_info:add")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody ConfigMaterialInfo configMaterialInfo) {
|
||||
|
||||
String chinese = configMaterialInfo.getMaterialName();
|
||||
String firstLetter = PinyinUtils.getFirstLetter(chinese);
|
||||
configMaterialInfo.setPinyin(firstLetter);
|
||||
configMaterialInfoService.save(configMaterialInfo);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param configMaterialInfo
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "物料信息-编辑")
|
||||
@ApiOperation(value="物料信息-编辑", notes="物料信息-编辑")
|
||||
@RequiresPermissions("configMaterialInfo:config_material_info:edit")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody ConfigMaterialInfo configMaterialInfo) {
|
||||
|
||||
String chinese = configMaterialInfo.getMaterialName();
|
||||
String firstLetter = PinyinUtils.getFirstLetter(chinese);
|
||||
configMaterialInfo.setPinyin(firstLetter);
|
||||
configMaterialInfoService.updateById(configMaterialInfo);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "物料信息-通过id删除")
|
||||
@ApiOperation(value="物料信息-通过id删除", notes="物料信息-通过id删除")
|
||||
@RequiresPermissions("configMaterialInfo:config_material_info:delete")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
configMaterialInfoService.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "物料信息-批量删除")
|
||||
@ApiOperation(value="物料信息-批量删除", notes="物料信息-批量删除")
|
||||
@RequiresPermissions("configMaterialInfo:config_material_info:deleteBatch")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.configMaterialInfoService.removeByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "物料信息-通过id查询")
|
||||
@ApiOperation(value="物料信息-通过id查询", notes="物料信息-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<ConfigMaterialInfo> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
ConfigMaterialInfo configMaterialInfo = configMaterialInfoService.getById(id);
|
||||
if(configMaterialInfo==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(configMaterialInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param configMaterialInfo
|
||||
*/
|
||||
@RequiresPermissions("configMaterialInfo:config_material_info:exportXls")
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, ConfigMaterialInfo configMaterialInfo) {
|
||||
return super.exportXls(request, configMaterialInfo, ConfigMaterialInfo.class, "物料信息");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("configMaterialInfo:config_material_info:importExcel")
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, ConfigMaterialInfo.class);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,186 @@
|
|||
package com.nu.modules.ConfigMaterial.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
import java.io.IOException;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLDecoder;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.system.query.QueryGenerator;
|
||||
import org.jeecg.common.system.query.QueryRuleEnum;
|
||||
import org.jeecg.common.util.oConvertUtils;
|
||||
import com.nu.modules.ConfigMaterial.entity.ConfigMaterialMedication;
|
||||
import com.nu.modules.ConfigMaterial.service.IConfigMaterialMedicationService;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.jeecgframework.poi.excel.ExcelImportUtil;
|
||||
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
||||
import org.jeecgframework.poi.excel.entity.ExportParams;
|
||||
import org.jeecgframework.poi.excel.entity.ImportParams;
|
||||
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
|
||||
import org.jeecg.common.system.base.controller.JeecgController;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
|
||||
/**
|
||||
* @Description: 物料用药类型
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-03-17
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="物料用药类型")
|
||||
@RestController
|
||||
@RequestMapping("/ConfigMaterial/configMaterialMedication")
|
||||
@Slf4j
|
||||
public class ConfigMaterialMedicationController extends JeecgController<ConfigMaterialMedication, IConfigMaterialMedicationService> {
|
||||
@Autowired
|
||||
private IConfigMaterialMedicationService configMaterialMedicationService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param configMaterialMedication
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "物料用药类型-分页列表查询")
|
||||
@ApiOperation(value="物料用药类型-分页列表查询", notes="物料用药类型-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<ConfigMaterialMedication>> queryPageList(ConfigMaterialMedication configMaterialMedication,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
// 自定义查询规则
|
||||
Map<String, QueryRuleEnum> customeRuleMap = new HashMap<>();
|
||||
// 自定义多选的查询规则为:LIKE_WITH_OR
|
||||
customeRuleMap.put("categoryId", QueryRuleEnum.LIKE_WITH_OR);
|
||||
customeRuleMap.put("typeId", QueryRuleEnum.LIKE_WITH_OR);
|
||||
customeRuleMap.put("izEnabled", QueryRuleEnum.LIKE_WITH_OR);
|
||||
QueryWrapper<ConfigMaterialMedication> queryWrapper = QueryGenerator.initQueryWrapper(configMaterialMedication, req.getParameterMap(),customeRuleMap);
|
||||
Page<ConfigMaterialMedication> page = new Page<ConfigMaterialMedication>(pageNo, pageSize);
|
||||
IPage<ConfigMaterialMedication> pageList = configMaterialMedicationService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param configMaterialMedication
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "物料用药类型-添加")
|
||||
@ApiOperation(value="物料用药类型-添加", notes="物料用药类型-添加")
|
||||
@RequiresPermissions("ConfigMaterial:config_material_medication:add")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody ConfigMaterialMedication configMaterialMedication) {
|
||||
configMaterialMedicationService.save(configMaterialMedication);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param configMaterialMedication
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "物料用药类型-编辑")
|
||||
@ApiOperation(value="物料用药类型-编辑", notes="物料用药类型-编辑")
|
||||
@RequiresPermissions("ConfigMaterial:config_material_medication:edit")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody ConfigMaterialMedication configMaterialMedication) {
|
||||
configMaterialMedicationService.updateById(configMaterialMedication);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "物料用药类型-通过id删除")
|
||||
@ApiOperation(value="物料用药类型-通过id删除", notes="物料用药类型-通过id删除")
|
||||
@RequiresPermissions("ConfigMaterial:config_material_medication:delete")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
configMaterialMedicationService.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "物料用药类型-批量删除")
|
||||
@ApiOperation(value="物料用药类型-批量删除", notes="物料用药类型-批量删除")
|
||||
@RequiresPermissions("ConfigMaterial:config_material_medication:deleteBatch")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.configMaterialMedicationService.removeByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "物料用药类型-通过id查询")
|
||||
@ApiOperation(value="物料用药类型-通过id查询", notes="物料用药类型-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<ConfigMaterialMedication> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
ConfigMaterialMedication configMaterialMedication = configMaterialMedicationService.getById(id);
|
||||
if(configMaterialMedication==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(configMaterialMedication);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param configMaterialMedication
|
||||
*/
|
||||
@RequiresPermissions("ConfigMaterial:config_material_medication:exportXls")
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, ConfigMaterialMedication configMaterialMedication) {
|
||||
return super.exportXls(request, configMaterialMedication, ConfigMaterialMedication.class, "物料用药类型");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("ConfigMaterial:config_material_medication:importExcel")
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, ConfigMaterialMedication.class);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,184 @@
|
|||
package com.nu.modules.ConfigMaterial.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
import java.io.IOException;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLDecoder;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.system.query.QueryGenerator;
|
||||
import org.jeecg.common.system.query.QueryRuleEnum;
|
||||
import org.jeecg.common.util.oConvertUtils;
|
||||
import com.nu.modules.ConfigMaterial.entity.ConfigMaterialType;
|
||||
import com.nu.modules.ConfigMaterial.service.IConfigMaterialTypeService;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.jeecgframework.poi.excel.ExcelImportUtil;
|
||||
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
||||
import org.jeecgframework.poi.excel.entity.ExportParams;
|
||||
import org.jeecgframework.poi.excel.entity.ImportParams;
|
||||
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
|
||||
import org.jeecg.common.system.base.controller.JeecgController;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
|
||||
/**
|
||||
* @Description: 物料类型
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-03-17
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="物料类型")
|
||||
@RestController
|
||||
@RequestMapping("/ConfigMaterial/configMaterialType")
|
||||
@Slf4j
|
||||
public class ConfigMaterialTypeController extends JeecgController<ConfigMaterialType, IConfigMaterialTypeService> {
|
||||
@Autowired
|
||||
private IConfigMaterialTypeService configMaterialTypeService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param configMaterialType
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "物料类型-分页列表查询")
|
||||
@ApiOperation(value="物料类型-分页列表查询", notes="物料类型-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<ConfigMaterialType>> queryPageList(ConfigMaterialType configMaterialType,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
// 自定义查询规则
|
||||
Map<String, QueryRuleEnum> customeRuleMap = new HashMap<>();
|
||||
// 自定义多选的查询规则为:LIKE_WITH_OR
|
||||
customeRuleMap.put("izEnabled", QueryRuleEnum.LIKE_WITH_OR);
|
||||
QueryWrapper<ConfigMaterialType> queryWrapper = QueryGenerator.initQueryWrapper(configMaterialType, req.getParameterMap(),customeRuleMap);
|
||||
Page<ConfigMaterialType> page = new Page<ConfigMaterialType>(pageNo, pageSize);
|
||||
IPage<ConfigMaterialType> pageList = configMaterialTypeService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param configMaterialType
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "物料类型-添加")
|
||||
@ApiOperation(value="物料类型-添加", notes="物料类型-添加")
|
||||
@RequiresPermissions("ConfigMaterial:config_material_type:add")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody ConfigMaterialType configMaterialType) {
|
||||
configMaterialTypeService.save(configMaterialType);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param configMaterialType
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "物料类型-编辑")
|
||||
@ApiOperation(value="物料类型-编辑", notes="物料类型-编辑")
|
||||
@RequiresPermissions("ConfigMaterial:config_material_type:edit")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody ConfigMaterialType configMaterialType) {
|
||||
configMaterialTypeService.updateById(configMaterialType);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "物料类型-通过id删除")
|
||||
@ApiOperation(value="物料类型-通过id删除", notes="物料类型-通过id删除")
|
||||
@RequiresPermissions("ConfigMaterial:config_material_type:delete")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
configMaterialTypeService.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "物料类型-批量删除")
|
||||
@ApiOperation(value="物料类型-批量删除", notes="物料类型-批量删除")
|
||||
@RequiresPermissions("ConfigMaterial:config_material_type:deleteBatch")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.configMaterialTypeService.removeByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "物料类型-通过id查询")
|
||||
@ApiOperation(value="物料类型-通过id查询", notes="物料类型-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<ConfigMaterialType> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
ConfigMaterialType configMaterialType = configMaterialTypeService.getById(id);
|
||||
if(configMaterialType==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(configMaterialType);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param configMaterialType
|
||||
*/
|
||||
@RequiresPermissions("ConfigMaterial:config_material_type:exportXls")
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, ConfigMaterialType configMaterialType) {
|
||||
return super.exportXls(request, configMaterialType, ConfigMaterialType.class, "物料类型");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("ConfigMaterial:config_material_type:importExcel")
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, ConfigMaterialType.class);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,83 @@
|
|||
package com.nu.modules.ConfigMaterial.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import org.jeecg.common.constant.ProvinceCityArea;
|
||||
import org.jeecg.common.util.SpringContextUtils;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.jeecg.common.aspect.annotation.Dict;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* @Description: 物料类别
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-03-17
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("config_material_category")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="config_material_category对象", description="物料类别")
|
||||
public class ConfigMaterialCategory implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**id*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "id")
|
||||
private java.lang.String id;
|
||||
/**物料类别名称*/
|
||||
@Excel(name = "物料类别名称", width = 15)
|
||||
@ApiModelProperty(value = "物料类别名称")
|
||||
private java.lang.String categoryName;
|
||||
/**是否启用 0启用 1未启用*/
|
||||
@Excel(name = "是否启用", width = 15, dicCode = "iz_enabled")
|
||||
@Dict(dicCode = "iz_enabled")
|
||||
@ApiModelProperty(value = "是否启用 0启用 1未启用")
|
||||
private java.lang.String izEnabled;
|
||||
/**是否删除 0未删除 1删除*/
|
||||
@Excel(name = "是否删除 0未删除 1删除", width = 15)
|
||||
@ApiModelProperty(value = "是否删除 0未删除 1删除")
|
||||
@TableLogic
|
||||
private java.lang.String delFlag;
|
||||
/**创建人*/
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private java.lang.String createBy;
|
||||
/**创建日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "创建日期")
|
||||
private java.util.Date createTime;
|
||||
/**更新人*/
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private java.lang.String updateBy;
|
||||
/**更新日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "更新日期")
|
||||
private java.util.Date updateTime;
|
||||
/**所属部门*/
|
||||
@ApiModelProperty(value = "所属部门")
|
||||
private java.lang.String sysOrgCode;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String typeName;
|
||||
@TableField(exist = false)
|
||||
private String medicationName;
|
||||
@TableField(exist = false)
|
||||
private String categoryId;
|
||||
@TableField(exist = false)
|
||||
private String typeId;
|
||||
@TableField(exist = false)
|
||||
private String medicationId;
|
||||
}
|
|
@ -0,0 +1,153 @@
|
|||
package com.nu.modules.configMaterialInfo.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import org.jeecg.common.constant.ProvinceCityArea;
|
||||
import org.jeecg.common.util.SpringContextUtils;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.jeecg.common.aspect.annotation.Dict;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* @Description: 物料信息
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-03-13
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("config_material_info")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="config_material_info对象", description="物料信息")
|
||||
public class ConfigMaterialInfo implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**id*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "id")
|
||||
private java.lang.String id;
|
||||
/**物料类别*/
|
||||
@Excel(name = "物料类别", width = 15, dictTable = "config_material_category", dicText = "category_name", dicCode = "id")
|
||||
@Dict(dictTable = "config_material_category", dicText = "category_name", dicCode = "id")
|
||||
@ApiModelProperty(value = "物料类别")
|
||||
private java.lang.String categoryId;
|
||||
/**物料类型*/
|
||||
@Excel(name = "物料类型", width = 15, dictTable = "config_material_type", dicText = "type_name", dicCode = "id")
|
||||
@Dict(dictTable = "config_material_type", dicText = "type_name", dicCode = "id")
|
||||
@ApiModelProperty(value = "物料类型")
|
||||
private java.lang.String typeId;
|
||||
/**用药类型*/
|
||||
@Excel(name = "用药类型", width = 15, dictTable = "config_material_medication", dicText = "medication_name", dicCode = "id")
|
||||
@Dict(dictTable = "config_material_medication", dicText = "medication_name", dicCode = "id")
|
||||
@ApiModelProperty(value = "用药类型")
|
||||
private java.lang.String medicationId;
|
||||
/**货品名称*/
|
||||
@Excel(name = "货品名称", width = 15)
|
||||
@ApiModelProperty(value = "货品名称")
|
||||
private java.lang.String materialName;
|
||||
/**货品编码*/
|
||||
@Excel(name = "货品编码", width = 15)
|
||||
@ApiModelProperty(value = "货品编码")
|
||||
private java.lang.String materialNo;
|
||||
/**规格型号*/
|
||||
@Excel(name = "规格型号", width = 15)
|
||||
@ApiModelProperty(value = "规格型号")
|
||||
private java.lang.String specificationModel;
|
||||
/**销售单价*/
|
||||
@Excel(name = "销售单价", width = 15)
|
||||
@ApiModelProperty(value = "销售单价")
|
||||
private java.math.BigDecimal salesUnitPrice;
|
||||
/**参考单价*/
|
||||
@Excel(name = "参考单价", width = 15)
|
||||
@ApiModelProperty(value = "参考单价")
|
||||
private java.math.BigDecimal referenceUnitPrice;
|
||||
/**货品单位*/
|
||||
@Excel(name = "货品单位", width = 15)
|
||||
@ApiModelProperty(value = "货品单位")
|
||||
private java.lang.String materialUnits;
|
||||
/**多单位开关 0关 1开*/
|
||||
@Excel(name = "多单位开关", width = 15,replace = {"开_Y","关_N"} )
|
||||
@ApiModelProperty(value = "多单位开关 0关 1开")
|
||||
private java.lang.String multiUnitSwitch;
|
||||
/**父级单位*/
|
||||
@Excel(name = "父级单位", width = 15)
|
||||
@ApiModelProperty(value = "父级单位")
|
||||
private java.lang.String oneUnit;
|
||||
/**父级单位兑换比例*/
|
||||
@Excel(name = "父级单位兑换比例", width = 15)
|
||||
@ApiModelProperty(value = "父级单位兑换比例")
|
||||
private java.lang.Integer oneUnitProportion;
|
||||
/**父级单位价格*/
|
||||
@Excel(name = "父级单位价格", width = 15)
|
||||
@ApiModelProperty(value = "父级单位价格")
|
||||
private java.math.BigDecimal oneUnitPrice;
|
||||
/**爷级单位*/
|
||||
@Excel(name = "爷级单位", width = 15)
|
||||
@ApiModelProperty(value = "爷级单位")
|
||||
private java.lang.String twoUnit;
|
||||
/**爷级单位兑换比例*/
|
||||
@Excel(name = "爷级单位兑换比例", width = 15)
|
||||
@ApiModelProperty(value = "爷级单位兑换比例")
|
||||
private java.lang.Integer twoUnitProportion;
|
||||
/**爷级单位价格*/
|
||||
@Excel(name = "爷级单位价格", width = 15)
|
||||
@ApiModelProperty(value = "爷级单位价格")
|
||||
private java.math.BigDecimal twoUnitPrice;
|
||||
/**多单位采购默认使用 0子集 1父级 2爷级*/
|
||||
@Excel(name = "多单位采购默认使用", width = 15)
|
||||
@ApiModelProperty(value = "多单位采购默认使用 0子集 1父级 2爷级")
|
||||
private java.lang.String multiUnitType;
|
||||
/**供应商*/
|
||||
@Excel(name = "供应商", width = 15,dictTable = "config_suppliers_info" , dicCode = "id" , dicText = "suppliers_name")
|
||||
@ApiModelProperty(value = "供应商")
|
||||
@Dict(dictTable = "config_suppliers_info" , dicCode = "id" , dicText = "suppliers_name")
|
||||
private java.lang.String suppliers;
|
||||
/**物料图片*/
|
||||
@ApiModelProperty(value = "物料图片")
|
||||
private java.lang.String materialImg;
|
||||
/**物料标识*/
|
||||
@ApiModelProperty(value = "物料标识")
|
||||
private java.lang.String materialIdent;
|
||||
/**是否启用 0启用 1未启用*/
|
||||
@Dict(dicCode = "iz_enabled")
|
||||
@ApiModelProperty(value = "是否启用 0启用 1未启用")
|
||||
private java.lang.String izEnabled;
|
||||
/**是否删除 0未删除 1删除*/
|
||||
@ApiModelProperty(value = "是否删除 0未删除 1删除")
|
||||
@TableLogic
|
||||
private java.lang.String delFlag;
|
||||
/**创建人*/
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private java.lang.String createBy;
|
||||
/**创建日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "创建日期")
|
||||
private java.util.Date createTime;
|
||||
/**更新人*/
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private java.lang.String updateBy;
|
||||
/**更新日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "更新日期")
|
||||
private java.util.Date updateTime;
|
||||
/**所属部门*/
|
||||
@ApiModelProperty(value = "所属部门")
|
||||
private java.lang.String sysOrgCode;
|
||||
/**拼音*/
|
||||
private java.lang.String pinyin;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String treeId;//树id,用于查询
|
||||
}
|
|
@ -0,0 +1,83 @@
|
|||
package com.nu.modules.ConfigMaterial.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import org.jeecg.common.constant.ProvinceCityArea;
|
||||
import org.jeecg.common.util.SpringContextUtils;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.jeecg.common.aspect.annotation.Dict;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* @Description: 物料用药类型
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-03-17
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("config_material_medication")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="config_material_medication对象", description="物料用药类型")
|
||||
public class ConfigMaterialMedication implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**id*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "id")
|
||||
private java.lang.String id;
|
||||
/**物料类别*/
|
||||
@Excel(name = "物料类别", width = 15, dictTable = "config_material_category", dicText = "category_name", dicCode = "id")
|
||||
@Dict(dictTable = "config_material_category", dicText = "category_name", dicCode = "id")
|
||||
@ApiModelProperty(value = "物料类别")
|
||||
private java.lang.String categoryId;
|
||||
/**物料类型*/
|
||||
@Excel(name = "物料类型", width = 15, dictTable = "config_material_type", dicText = "type_name", dicCode = "id")
|
||||
@Dict(dictTable = "config_material_type", dicText = "type_name", dicCode = "id")
|
||||
@ApiModelProperty(value = "物料类型")
|
||||
private java.lang.String typeId;
|
||||
/**名称*/
|
||||
@Excel(name = "名称", width = 15)
|
||||
@ApiModelProperty(value = "名称")
|
||||
private java.lang.String medicationName;
|
||||
/**是否启用 0启用 1未启用*/
|
||||
@Excel(name = "是否启用", width = 15, dicCode = "iz_enabled")
|
||||
@Dict(dicCode = "iz_enabled")
|
||||
@ApiModelProperty(value = "是否启用 0启用 1未启用")
|
||||
private java.lang.String izEnabled;
|
||||
/**是否删除 0未删除 1删除*/
|
||||
@ApiModelProperty(value = "是否删除 0未删除 1删除")
|
||||
@TableLogic
|
||||
private java.lang.String delFlag;
|
||||
/**创建人*/
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private java.lang.String createBy;
|
||||
/**创建日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "创建日期")
|
||||
private java.util.Date createTime;
|
||||
/**更新人*/
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private java.lang.String updateBy;
|
||||
/**更新日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "更新日期")
|
||||
private java.util.Date updateTime;
|
||||
/**所属部门*/
|
||||
@ApiModelProperty(value = "所属部门")
|
||||
private java.lang.String sysOrgCode;
|
||||
}
|
|
@ -0,0 +1,78 @@
|
|||
package com.nu.modules.ConfigMaterial.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import org.jeecg.common.constant.ProvinceCityArea;
|
||||
import org.jeecg.common.util.SpringContextUtils;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.jeecg.common.aspect.annotation.Dict;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* @Description: 物料类型
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-03-17
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("config_material_type")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="config_material_type对象", description="物料类型")
|
||||
public class ConfigMaterialType implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**id*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "id")
|
||||
private java.lang.String id;
|
||||
/**物料类别*/
|
||||
@Excel(name = "物料类别", width = 15,dictTable = "config_material_category" , dicText = "category_name" , dicCode = "id")
|
||||
@ApiModelProperty(value = "物料类别")
|
||||
@Dict(dictTable = "config_material_category" , dicText = "category_name" , dicCode = "id")
|
||||
private java.lang.String categoryId;
|
||||
/**物料类型*/
|
||||
@Excel(name = "物料类型", width = 15)
|
||||
@ApiModelProperty(value = "物料类型")
|
||||
private java.lang.String typeName;
|
||||
/**是否启用 0启用 1未启用*/
|
||||
@Excel(name = "是否启用", width = 15, dicCode = "iz_enabled")
|
||||
@Dict(dicCode = "iz_enabled")
|
||||
@ApiModelProperty(value = "是否启用 0启用 1未启用")
|
||||
private java.lang.String izEnabled;
|
||||
/**是否删除 0未删除 1删除*/
|
||||
@ApiModelProperty(value = "是否删除 0未删除 1删除")
|
||||
@TableLogic
|
||||
private java.lang.String delFlag;
|
||||
/**创建人*/
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private java.lang.String createBy;
|
||||
/**创建日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "创建日期")
|
||||
private java.util.Date createTime;
|
||||
/**更新人*/
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private java.lang.String updateBy;
|
||||
/**更新日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "更新日期")
|
||||
private java.util.Date updateTime;
|
||||
/**所属部门*/
|
||||
@ApiModelProperty(value = "所属部门")
|
||||
private java.lang.String sysOrgCode;
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
package com.nu.modules.ConfigMaterial.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
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 org.apache.ibatis.annotations.Param;
|
||||
import com.nu.modules.ConfigMaterial.entity.ConfigMaterialCategory;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 物料类别
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-03-17
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface ConfigMaterialCategoryMapper extends BaseMapper<ConfigMaterialCategory> {
|
||||
|
||||
IPage<ConfigMaterialCategory> selectMaterialList(Page<ConfigMaterialCategory> page,@Param(Constants.WRAPPER) QueryWrapper<ConfigMaterialCategory> queryWrapper);
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
package com.nu.modules.configMaterialInfo.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.nu.modules.configMaterialInfo.entity.ConfigMaterialInfo;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 物料信息
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-03-13
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface ConfigMaterialInfoMapper extends BaseMapper<ConfigMaterialInfo> {
|
||||
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
package com.nu.modules.ConfigMaterial.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.nu.modules.ConfigMaterial.entity.ConfigMaterialMedication;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 物料用药类型
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-03-17
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface ConfigMaterialMedicationMapper extends BaseMapper<ConfigMaterialMedication> {
|
||||
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
package com.nu.modules.ConfigMaterial.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.nu.modules.ConfigMaterial.entity.ConfigMaterialType;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 物料类型
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-03-17
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface ConfigMaterialTypeMapper extends BaseMapper<ConfigMaterialType> {
|
||||
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.nu.modules.ConfigMaterial.mapper.ConfigMaterialCategoryMapper">
|
||||
<select id="selectMaterialList" resultType="com.nu.modules.ConfigMaterial.entity.ConfigMaterialCategory">
|
||||
select * from (
|
||||
select
|
||||
a.create_time,
|
||||
ifnull(c.id,ifnull(b.id,a.id)) as id,
|
||||
a.category_name,
|
||||
a.iz_enabled,
|
||||
b.type_name,
|
||||
c.medication_name,
|
||||
a.id as category_id,
|
||||
b.id as type_id,
|
||||
c.id as medication_id
|
||||
from config_material_category a
|
||||
LEFT JOIN config_material_type b on a.id = b.category_id and b.iz_enabled = 0 and b.del_flag = 0
|
||||
LEFT JOIN config_material_medication c on b.id = c.type_id and c.iz_enabled = 0 and c.del_flag = 0
|
||||
where a.iz_enabled = 0 and a.del_flag = 0
|
||||
order by a.sort asc,b.id asc,c.id asc ) a
|
||||
${ew.customSqlSegment}
|
||||
</select>
|
||||
</mapper>
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.nu.modules.configMaterialInfo.mapper.ConfigMaterialInfoMapper">
|
||||
|
||||
</mapper>
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.nu.modules.ConfigMaterial.mapper.ConfigMaterialMedicationMapper">
|
||||
|
||||
</mapper>
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.nu.modules.ConfigMaterial.mapper.ConfigMaterialTypeMapper">
|
||||
|
||||
</mapper>
|
|
@ -0,0 +1,23 @@
|
|||
package com.nu.modules.ConfigMaterial.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.nu.modules.ConfigMaterial.entity.ConfigMaterialCategory;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Description: 物料类别
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-03-17
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IConfigMaterialCategoryService extends IService<ConfigMaterialCategory> {
|
||||
|
||||
IPage<ConfigMaterialCategory> selectMaterialList(Page<ConfigMaterialCategory> page, QueryWrapper<ConfigMaterialCategory> queryWrapper);
|
||||
|
||||
List<Map<String,Object>> getMaterialTreeData(ConfigMaterialCategory configMaterialCategory);
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
package com.nu.modules.configMaterialInfo.service;
|
||||
|
||||
import com.nu.modules.configMaterialInfo.entity.ConfigMaterialInfo;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @Description: 物料信息
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-03-13
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IConfigMaterialInfoService extends IService<ConfigMaterialInfo> {
|
||||
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
package com.nu.modules.ConfigMaterial.service;
|
||||
|
||||
import com.nu.modules.ConfigMaterial.entity.ConfigMaterialMedication;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @Description: 物料用药类型
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-03-17
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IConfigMaterialMedicationService extends IService<ConfigMaterialMedication> {
|
||||
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
package com.nu.modules.ConfigMaterial.service;
|
||||
|
||||
import com.nu.modules.ConfigMaterial.entity.ConfigMaterialType;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @Description: 物料类型
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-03-17
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IConfigMaterialTypeService extends IService<ConfigMaterialType> {
|
||||
|
||||
}
|
|
@ -0,0 +1,107 @@
|
|||
package com.nu.modules.ConfigMaterial.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.nu.modules.ConfigMaterial.entity.ConfigMaterialCategory;
|
||||
import com.nu.modules.ConfigMaterial.entity.ConfigMaterialMedication;
|
||||
import com.nu.modules.ConfigMaterial.entity.ConfigMaterialType;
|
||||
import com.nu.modules.ConfigMaterial.mapper.ConfigMaterialCategoryMapper;
|
||||
import com.nu.modules.ConfigMaterial.mapper.ConfigMaterialMedicationMapper;
|
||||
import com.nu.modules.ConfigMaterial.mapper.ConfigMaterialTypeMapper;
|
||||
import com.nu.modules.ConfigMaterial.service.IConfigMaterialCategoryService;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* @Description: 物料类别
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-03-17
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class ConfigMaterialCategoryServiceImpl extends ServiceImpl<ConfigMaterialCategoryMapper, ConfigMaterialCategory> implements IConfigMaterialCategoryService {
|
||||
|
||||
@Autowired
|
||||
public ConfigMaterialTypeMapper configMaterialTypeMapper;
|
||||
|
||||
@Autowired
|
||||
public ConfigMaterialMedicationMapper configMaterialMedicationMapper;
|
||||
|
||||
@Override
|
||||
public IPage<ConfigMaterialCategory> selectMaterialList(Page<ConfigMaterialCategory> page, QueryWrapper<ConfigMaterialCategory> queryWrapper) {
|
||||
return baseMapper.selectMaterialList(page,queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String,Object>>getMaterialTreeData(ConfigMaterialCategory configMaterialCategory) {
|
||||
|
||||
//查询护理分类信息
|
||||
QueryWrapper<ConfigMaterialCategory> categoryQueryWrapper = new QueryWrapper<>();
|
||||
categoryQueryWrapper.eq("iz_enabled","0");
|
||||
categoryQueryWrapper.eq("del_flag","0");
|
||||
categoryQueryWrapper.orderByAsc("sort");
|
||||
List<ConfigMaterialCategory> list =baseMapper.selectList(categoryQueryWrapper);
|
||||
|
||||
//查询护理类型信息
|
||||
QueryWrapper<ConfigMaterialType> typeQueryWrapper = new QueryWrapper<>();
|
||||
typeQueryWrapper.eq("iz_enabled","0");
|
||||
typeQueryWrapper.eq("del_flag","0");
|
||||
List<ConfigMaterialType> list2 = configMaterialTypeMapper.selectList(typeQueryWrapper);
|
||||
|
||||
//查询用药类型信息
|
||||
QueryWrapper<ConfigMaterialMedication> medicationQueryWrapper = new QueryWrapper<>();
|
||||
medicationQueryWrapper.eq("iz_enabled","0");
|
||||
medicationQueryWrapper.eq("del_flag","0");
|
||||
List<ConfigMaterialMedication> list3 = configMaterialMedicationMapper.selectList(medicationQueryWrapper);
|
||||
|
||||
|
||||
List<Map<String,Object>> wllxMapList = new ArrayList<Map<String,Object>>();
|
||||
for(ConfigMaterialType par : list2){
|
||||
Map<String,Object> wllxMap = new HashMap<String,Object>();
|
||||
List<Map<String,Object>> yylxMapList = new ArrayList<Map<String,Object>>();
|
||||
for(ConfigMaterialMedication yylxPar:list3){
|
||||
if(StringUtils.equals(yylxPar.getTypeId(),par.getId())){
|
||||
Map<String,Object> yylxMap = new HashMap<String,Object>();
|
||||
yylxMap.put("key",yylxPar.getId());
|
||||
yylxMap.put("levle","3");
|
||||
yylxMap.put("title",yylxPar.getMedicationName());
|
||||
yylxMapList.add(yylxMap);
|
||||
}
|
||||
}
|
||||
wllxMap.put("key",par.getId());
|
||||
wllxMap.put("parentId",par.getCategoryId());
|
||||
wllxMap.put("title",par.getTypeName());
|
||||
wllxMap.put("levle","2");
|
||||
wllxMap.put("children",yylxMapList);
|
||||
wllxMapList.add(wllxMap);
|
||||
}
|
||||
|
||||
List<Map<String,Object>> infoMapList = new ArrayList<Map<String,Object>>();
|
||||
int index = 0;
|
||||
for(ConfigMaterialCategory par : list){
|
||||
index++;
|
||||
Map<String,Object> infoMap = new HashMap<String,Object>();
|
||||
List<Map<String,Object>> wllxMap2List = new ArrayList<Map<String,Object>>();
|
||||
for(Map<String,Object> wllxPar : wllxMapList){
|
||||
if(StringUtils.equals(par.getId(),wllxPar.get("parentId").toString())){
|
||||
wllxMap2List.add(wllxPar);
|
||||
}
|
||||
}
|
||||
infoMap.put("key",par.getId());
|
||||
infoMap.put("title",index + " " +par.getCategoryName());
|
||||
infoMap.put("levle","1");
|
||||
infoMap.put("children",wllxMap2List);
|
||||
infoMapList.add(infoMap);
|
||||
}
|
||||
|
||||
|
||||
|
||||
return infoMapList;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
package com.nu.modules.configMaterialInfo.service.impl;
|
||||
|
||||
import com.nu.modules.configMaterialInfo.entity.ConfigMaterialInfo;
|
||||
import com.nu.modules.configMaterialInfo.mapper.ConfigMaterialInfoMapper;
|
||||
import com.nu.modules.configMaterialInfo.service.IConfigMaterialInfoService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
/**
|
||||
* @Description: 物料信息
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-03-13
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class ConfigMaterialInfoServiceImpl extends ServiceImpl<ConfigMaterialInfoMapper, ConfigMaterialInfo> implements IConfigMaterialInfoService {
|
||||
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
package com.nu.modules.ConfigMaterial.service.impl;
|
||||
|
||||
import com.nu.modules.ConfigMaterial.entity.ConfigMaterialMedication;
|
||||
import com.nu.modules.ConfigMaterial.mapper.ConfigMaterialMedicationMapper;
|
||||
import com.nu.modules.ConfigMaterial.service.IConfigMaterialMedicationService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
/**
|
||||
* @Description: 物料用药类型
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-03-17
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class ConfigMaterialMedicationServiceImpl extends ServiceImpl<ConfigMaterialMedicationMapper, ConfigMaterialMedication> implements IConfigMaterialMedicationService {
|
||||
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
package com.nu.modules.ConfigMaterial.service.impl;
|
||||
|
||||
import com.nu.modules.ConfigMaterial.entity.ConfigMaterialType;
|
||||
import com.nu.modules.ConfigMaterial.mapper.ConfigMaterialTypeMapper;
|
||||
import com.nu.modules.ConfigMaterial.service.IConfigMaterialTypeService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
/**
|
||||
* @Description: 物料类型
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-03-17
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class ConfigMaterialTypeServiceImpl extends ServiceImpl<ConfigMaterialTypeMapper, ConfigMaterialType> implements IConfigMaterialTypeService {
|
||||
|
||||
}
|
|
@ -77,11 +77,9 @@ public class ConfigSuppliersInfo implements Serializable {
|
|||
@ApiModelProperty(value = "微信账号")
|
||||
private java.lang.String wechartId;
|
||||
/**资质照片*/
|
||||
@Excel(name = "资质照片", width = 15)
|
||||
@ApiModelProperty(value = "资质照片")
|
||||
private java.lang.String imgPath;
|
||||
/**是否删除 0未删除 1删除*/
|
||||
@Excel(name = "是否删除 0未删除 1删除", width = 15)
|
||||
@ApiModelProperty(value = "是否删除 0未删除 1删除")
|
||||
@TableLogic
|
||||
private java.lang.String delFlag;
|
||||
|
|
|
@ -0,0 +1,58 @@
|
|||
package com.nu.modules.utils;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.sourceforge.pinyin4j.PinyinHelper;
|
||||
import net.sourceforge.pinyin4j.format.HanyuPinyinCaseType;
|
||||
import net.sourceforge.pinyin4j.format.HanyuPinyinOutputFormat;
|
||||
import net.sourceforge.pinyin4j.format.HanyuPinyinToneType;
|
||||
import net.sourceforge.pinyin4j.format.exception.BadHanyuPinyinOutputFormatCombination;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Slf4j
|
||||
public class PinyinUtils {
|
||||
|
||||
|
||||
public static String test(String chinese) {
|
||||
return chinese;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取汉字串拼音首字母,英文字符不变
|
||||
*
|
||||
* @param chinese 汉字串
|
||||
* @return 汉语拼音首字母
|
||||
*/
|
||||
public static String getFirstLetter(String chinese) {
|
||||
StringBuilder result = new StringBuilder();
|
||||
HanyuPinyinOutputFormat format = new HanyuPinyinOutputFormat();
|
||||
format.setCaseType(HanyuPinyinCaseType.UPPERCASE); // 设置拼音为大写
|
||||
format.setToneType(HanyuPinyinToneType.WITHOUT_TONE); // 不带声调
|
||||
|
||||
char[] arr = chinese.toCharArray();
|
||||
for (char c : arr) {
|
||||
try {
|
||||
// 判断是否是汉字字符
|
||||
if (Character.toString(c).matches("[\\u4E00-\\u9FA5]+")) {
|
||||
String[] pinyinArray = PinyinHelper.toHanyuPinyinStringArray(c, format);
|
||||
if (pinyinArray != null) {
|
||||
result.append(pinyinArray[0].charAt(0)); // 取拼音的首字母
|
||||
} else {
|
||||
result.append(c); // 如果转换失败,则原样保留字符
|
||||
}
|
||||
} else {
|
||||
result.append(c); // 非汉字字符,直接拼接
|
||||
}
|
||||
} catch (BadHanyuPinyinOutputFormatCombination e) {
|
||||
e.printStackTrace();
|
||||
result.append(c); // 如果捕获到异常,则原样保留字符
|
||||
}
|
||||
}
|
||||
return result.toString();
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
String chinese = "汉字转拼音取首字母";
|
||||
String firstLetter = getFirstLetter(chinese);
|
||||
System.out.println("拼音首字母: " + firstLetter); // 输出: HZTPQSZMX
|
||||
}
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
#mysql
|
||||
diver_name=com.mysql.jdbc.Driver
|
||||
url=jdbc:mysql://1.92.152.160:33061/nursing_unit_001?useUnicode=true&characterEncoding=UTF-8
|
||||
url=jdbc:mysql://1.92.152.160:33061/nursing_unit?useUnicode=true&characterEncoding=UTF-8
|
||||
username=root
|
||||
password=root
|
||||
database_name=jeecg-boot
|
||||
|
|
Loading…
Reference in New Issue