部门管理增加省市区等
This commit is contained in:
parent
1c45d971b5
commit
09bd0e2cda
|
@ -11,8 +11,12 @@ import java.net.URLDecoder;
|
|||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.nu.modules.nuBizAdvisoryInfo.entity.NuBizAdvisoryInfo;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.system.api.ISysBaseAPI;
|
||||
import org.jeecg.common.system.query.QueryGenerator;
|
||||
import org.jeecg.common.system.query.QueryRuleEnum;
|
||||
import org.jeecg.common.util.oConvertUtils;
|
||||
|
@ -31,6 +35,7 @@ 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.cloud.commons.util.IdUtils;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||
|
@ -54,6 +59,8 @@ import org.apache.shiro.authz.annotation.RequiresPermissions;
|
|||
public class NuBaseInfoController extends JeecgController<NuBaseInfo, INuBaseInfoService> {
|
||||
@Autowired
|
||||
private INuBaseInfoService nuBaseInfoService;
|
||||
@Autowired
|
||||
private ISysBaseAPI sysBaseAPI;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
|
@ -91,6 +98,24 @@ public class NuBaseInfoController extends JeecgController<NuBaseInfo, INuBaseInf
|
|||
@RequiresPermissions("nuBaseInfo:nu_base_info:add")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody NuBaseInfo nuBaseInfo) {
|
||||
JSONObject deptInfo = sysBaseAPI.getDeptInfo();
|
||||
String orgCode = deptInfo.getString("code");
|
||||
if (StringUtils.isBlank(orgCode)) {
|
||||
throw new RuntimeException("请先在部门管理中设置机构编码!");
|
||||
}
|
||||
try {
|
||||
Integer code = nuBaseInfoService.getCode();
|
||||
if (code == null) {
|
||||
nuBaseInfo.setCode(orgCode + "-001");
|
||||
} else {
|
||||
//保证3位字符串 不足前面用0补全
|
||||
String codeStr = String.format("%03d", code + 1);
|
||||
nuBaseInfo.setCode(orgCode + "-" + codeStr);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
nuBaseInfo.setCode(orgCode + "-" + IdUtil.simpleUUID());
|
||||
}
|
||||
nuBaseInfoService.save(nuBaseInfo);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
|
|
@ -42,6 +42,10 @@ public class NuBaseInfo implements Serializable {
|
|||
@Excel(name = "护理单元名称", width = 15)
|
||||
@ApiModelProperty(value = "护理单元名称")
|
||||
private java.lang.String nuName;
|
||||
/**护理单元编码*/
|
||||
@Excel(name = "护理单元编码", width = 15)
|
||||
@ApiModelProperty(value = "护理单元编码")
|
||||
private java.lang.String code;
|
||||
/**区域标签ID*/
|
||||
@Excel(name = "区域标签ID", width = 15, dicCode = "nu_type")
|
||||
@Dict(dicCode = "nu_type")
|
||||
|
|
|
@ -14,4 +14,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|||
*/
|
||||
public interface NuBaseInfoMapper extends BaseMapper<NuBaseInfo> {
|
||||
|
||||
Integer getCode();
|
||||
|
||||
}
|
||||
|
|
|
@ -2,4 +2,9 @@
|
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.nu.modules.nuBaseInfo.mapper.NuBaseInfoMapper">
|
||||
|
||||
<select id="getCode" resultType="java.lang.Integer">
|
||||
SELECT MAX(CAST(SUBSTRING_INDEX(code, '-', -1) AS UNSIGNED)) AS max_number
|
||||
FROM nu_base_info
|
||||
WHERE SUBSTRING_INDEX(code, '-', -1) REGEXP '^[0-9]+$';
|
||||
</select>
|
||||
</mapper>
|
|
@ -11,4 +11,5 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
|||
*/
|
||||
public interface INuBaseInfoService extends IService<NuBaseInfo> {
|
||||
|
||||
Integer getCode();
|
||||
}
|
||||
|
|
|
@ -16,4 +16,8 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|||
@Service
|
||||
public class NuBaseInfoServiceImpl extends ServiceImpl<NuBaseInfoMapper, NuBaseInfo> implements INuBaseInfoService {
|
||||
|
||||
@Override
|
||||
public Integer getCode() {
|
||||
return baseMapper.getCode();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -133,7 +133,7 @@ public class AppCameraInfo implements Serializable {
|
|||
private String topTime;
|
||||
/**护理单元*/
|
||||
@ApiModelProperty(value = "护理单元ID")
|
||||
@Dict(dictTable ="nu_base_info",dicText = "nu_name",dicCode = "id")
|
||||
@Dict(dictTable ="nu_base_info",dicText = "nu_name",dicCode = "code")
|
||||
private String nuId;
|
||||
/**护理单元*/
|
||||
@ApiModelProperty(value = "护理单元")
|
||||
|
|
|
@ -5,7 +5,7 @@ import org.springframework.stereotype.Component;
|
|||
|
||||
import java.security.MessageDigest;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
|
||||
@Component
|
||||
|
@ -24,22 +24,26 @@ public class SafetyUtil {
|
|||
* @param secureKey 客户端传入的密钥(MD5 值)
|
||||
* @return true=验证通过,false=验证失败
|
||||
*/
|
||||
|
||||
public static boolean validateSecureKey(String secureKey) {
|
||||
if (secureKey == null || downloadkey == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// 1. 获取当前日期(yyyyMMdd)
|
||||
String currentDate = LocalDate.now().format(DateTimeFormatter.ofPattern("yyyyMMdd"));
|
||||
// 获取当前时间(精确到分钟,格式为 yyyyMMddHHmm)
|
||||
String currentTime = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmm"));
|
||||
// 获取前一分钟的时间(用于扩大验证窗口)
|
||||
String previousMinute = LocalDateTime.now().minusMinutes(1).format(DateTimeFormatter.ofPattern("yyyyMMddHHmm"));
|
||||
|
||||
// 2. 复杂混拼(固定规则)
|
||||
String mixedKey = complexMix(downloadkey, currentDate);
|
||||
|
||||
// 3. 计算 MD5
|
||||
// 验证当前时间的密钥
|
||||
String mixedKey = complexMix(downloadkey, currentTime);
|
||||
String md5Hash = calculateMD5(mixedKey);
|
||||
if (secureKey.equalsIgnoreCase(md5Hash)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// 4. 比较 secureKey 是否匹配(忽略大小写)
|
||||
// 验证前一分钟的密钥(扩大验证窗口)
|
||||
mixedKey = complexMix(downloadkey, previousMinute);
|
||||
md5Hash = calculateMD5(mixedKey);
|
||||
return secureKey.equalsIgnoreCase(md5Hash);
|
||||
}
|
||||
|
||||
|
@ -54,7 +58,6 @@ public class SafetyUtil {
|
|||
* 进行倒序
|
||||
* 3.每 3个字符插入一个固定干扰符 '#'
|
||||
*/
|
||||
|
||||
private static String complexMix(String key, String date) {
|
||||
StringBuilder mixed = new StringBuilder();
|
||||
|
||||
|
@ -102,19 +105,22 @@ public class SafetyUtil {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取当前的安全密钥
|
||||
* 现在包含精确到分钟的时间信息(yyyyMMddHHmm)
|
||||
*/
|
||||
public static String getSecureKey() {
|
||||
if (downloadkey == null) {
|
||||
return "aaa";
|
||||
}
|
||||
|
||||
// 1. 获取当前日期(yyyyMMdd)
|
||||
String currentDate = LocalDate.now().format(DateTimeFormatter.ofPattern("yyyyMMdd"));
|
||||
// 获取当前时间(精确到分钟,格式为 yyyyMMddHHmm)
|
||||
String currentTime = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmm"));
|
||||
|
||||
// 2. 复杂混拼(固定规则)
|
||||
String mixedKey = complexMix(downloadkey, currentDate);
|
||||
// 复杂混拼(固定规则)
|
||||
String mixedKey = complexMix(downloadkey, currentTime);
|
||||
|
||||
// 3. 计算 MD5 并返回
|
||||
// 计算 MD5 并返回
|
||||
return calculateMD5(mixedKey);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -132,8 +132,8 @@ public class CameraInfo implements Serializable {
|
|||
@TableField(exist = false)
|
||||
private String topTime;
|
||||
/**护理单元*/
|
||||
@ApiModelProperty(value = "护理单元ID")
|
||||
@Dict(dictTable ="nu_base_info",dicText = "nu_name",dicCode = "id")
|
||||
@ApiModelProperty(value = "护理单元编码")
|
||||
@Dict(dictTable ="nu_base_info",dicText = "nu_name",dicCode = "code")
|
||||
private String nuId;
|
||||
/**护理单元*/
|
||||
@ApiModelProperty(value = "护理单元")
|
||||
|
|
|
@ -129,12 +129,12 @@
|
|||
|
||||
<select id="findNuPage" parameterType="com.nu.modules.tplink.camera.entity.CameraInfo" resultType="com.nu.modules.tplink.camera.entity.CameraInfo">
|
||||
select
|
||||
id as nuId,
|
||||
code as nuId,
|
||||
nu_name as nuName
|
||||
from nu_base_info b
|
||||
<where>
|
||||
<if test="params.nuId != null and params.nuId != ''">
|
||||
AND b.id = #{params.nuId}
|
||||
AND b.code = #{params.nuId}
|
||||
</if>
|
||||
<if test="params.nuName != null and params.nuName != ''">
|
||||
AND b.nu_name LIKE concat('%',#{params.nuName},'%')
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<groupId>com.nursingunit.boot</groupId>
|
||||
<artifactId>nu-payment-api</artifactId>
|
||||
<version>2.0.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>nu-payment-local-api</artifactId>
|
||||
|
||||
</project>
|
|
@ -0,0 +1,24 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<groupId>com.nursingunit.boot</groupId>
|
||||
<artifactId>nursing-unit-payment</artifactId>
|
||||
<version>2.0.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>nu-payment-api</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<modules>
|
||||
<module>nu-payment-local-api</module>
|
||||
</modules>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.nursingunit.boot</groupId>
|
||||
<artifactId>nursing-unit-base-core</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
|
@ -0,0 +1,35 @@
|
|||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<groupId>com.nursingunit.boot</groupId>
|
||||
<artifactId>nursing-unit-payment</artifactId>
|
||||
<version>2.0.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>nu-payment-biz</artifactId>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.nursingunit.boot</groupId>
|
||||
<artifactId>nu-payment-local-api</artifactId>
|
||||
<version>${nursingunit.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.hibernate</groupId>
|
||||
<artifactId>hibernate-core</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jeecgframework.boot</groupId>
|
||||
<artifactId>hibernate-re</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- 企业微信/钉钉 api -->
|
||||
<dependency>
|
||||
<groupId>org.jeecgframework</groupId>
|
||||
<artifactId>weixin4j</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
</project>
|
|
@ -0,0 +1,186 @@
|
|||
package com.nu.modules.systemorder.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.systemorder.entity.SystemOrder;
|
||||
import com.nu.modules.systemorder.service.ISystemOrderService;
|
||||
|
||||
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: 张明远
|
||||
* @Date: 2025-05-30
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="系统订单表")
|
||||
@RestController
|
||||
@RequestMapping("/systemorder/systemOrder")
|
||||
@Slf4j
|
||||
public class SystemOrderController extends JeecgController<SystemOrder, ISystemOrderService> {
|
||||
@Autowired
|
||||
private ISystemOrderService systemOrderService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param systemOrder
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "系统订单表-分页列表查询")
|
||||
@ApiOperation(value="系统订单表-分页列表查询", notes="系统订单表-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<SystemOrder>> queryPageList(SystemOrder systemOrder,
|
||||
@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("nursingUnit", QueryRuleEnum.LIKE_WITH_OR);
|
||||
customeRuleMap.put("orderType", QueryRuleEnum.LIKE_WITH_OR);
|
||||
customeRuleMap.put("orderStatus", QueryRuleEnum.LIKE_WITH_OR);
|
||||
QueryWrapper<SystemOrder> queryWrapper = QueryGenerator.initQueryWrapper(systemOrder, req.getParameterMap(),customeRuleMap);
|
||||
Page<SystemOrder> page = new Page<SystemOrder>(pageNo, pageSize);
|
||||
IPage<SystemOrder> pageList = systemOrderService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param systemOrder
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "系统订单表-添加")
|
||||
@ApiOperation(value="系统订单表-添加", notes="系统订单表-添加")
|
||||
@RequiresPermissions("systemorder:nu_system_order:add")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody SystemOrder systemOrder) {
|
||||
systemOrderService.save(systemOrder);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param systemOrder
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "系统订单表-编辑")
|
||||
@ApiOperation(value="系统订单表-编辑", notes="系统订单表-编辑")
|
||||
@RequiresPermissions("systemorder:nu_system_order:edit")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody SystemOrder systemOrder) {
|
||||
systemOrderService.updateById(systemOrder);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "系统订单表-通过id删除")
|
||||
@ApiOperation(value="系统订单表-通过id删除", notes="系统订单表-通过id删除")
|
||||
@RequiresPermissions("systemorder:nu_system_order:delete")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
systemOrderService.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "系统订单表-批量删除")
|
||||
@ApiOperation(value="系统订单表-批量删除", notes="系统订单表-批量删除")
|
||||
@RequiresPermissions("systemorder:nu_system_order:deleteBatch")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.systemOrderService.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<SystemOrder> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
SystemOrder systemOrder = systemOrderService.getById(id);
|
||||
if(systemOrder==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(systemOrder);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param systemOrder
|
||||
*/
|
||||
@RequiresPermissions("systemorder:nu_system_order:exportXls")
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, SystemOrder systemOrder) {
|
||||
return super.exportXls(request, systemOrder, SystemOrder.class, "系统订单表");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("systemorder:nu_system_order:importExcel")
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, SystemOrder.class);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,98 @@
|
|||
package com.nu.modules.systemorder.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: 张明远
|
||||
* @Date: 2025-05-30
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("nu_system_order")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="nu_system_order对象", description="系统订单表")
|
||||
public class SystemOrder 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 orgCode;
|
||||
/**护理单元*/
|
||||
@Excel(name = "护理单元", width = 15)
|
||||
@ApiModelProperty(value = "护理单元")
|
||||
private java.lang.String nursingUnit;
|
||||
/**支付人的openId*/
|
||||
@Excel(name = "支付人的openId", width = 15)
|
||||
@ApiModelProperty(value = "支付人的openId")
|
||||
private java.lang.String openId;
|
||||
/**客户id(系统中的)*/
|
||||
@Excel(name = "客户id(系统中的)", width = 15)
|
||||
@ApiModelProperty(value = "客户id(系统中的)")
|
||||
private java.lang.String customerId;
|
||||
/**订单类型(字典order_type)*/
|
||||
@Excel(name = "订单类型(字典order_type)", width = 15, dicCode = "order_type")
|
||||
@Dict(dicCode = "order_type")
|
||||
@ApiModelProperty(value = "订单类型(字典order_type)")
|
||||
private java.lang.String orderType;
|
||||
/**金额*/
|
||||
@Excel(name = "金额", width = 15)
|
||||
@ApiModelProperty(value = "金额")
|
||||
private java.math.BigDecimal amount;
|
||||
/**下单时间*/
|
||||
@Excel(name = "下单时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
|
||||
@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 orderTime;
|
||||
/**回执时间*/
|
||||
@Excel(name = "回执时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
|
||||
@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 receiptTime;
|
||||
/**订单状态*/
|
||||
@Excel(name = "订单状态", width = 15)
|
||||
@ApiModelProperty(value = "订单状态")
|
||||
private java.lang.String orderStatus;
|
||||
/**订单名称*/
|
||||
@Excel(name = "订单名称", width = 15)
|
||||
@ApiModelProperty(value = "订单名称")
|
||||
private java.lang.String orderName;
|
||||
/**订单描述(咱们自己说明的跟微信支付回执没关系)*/
|
||||
@Excel(name = "订单描述(咱们自己说明的跟微信支付回执没关系)", width = 15)
|
||||
@ApiModelProperty(value = "订单描述(咱们自己说明的跟微信支付回执没关系)")
|
||||
private java.lang.String orderDescription;
|
||||
/**回执描述*/
|
||||
@Excel(name = "回执描述", width = 15)
|
||||
@ApiModelProperty(value = "回执描述")
|
||||
private java.lang.String receiptDescription;
|
||||
/**回执报文*/
|
||||
@Excel(name = "回执报文", width = 15)
|
||||
@ApiModelProperty(value = "回执报文")
|
||||
private java.lang.String receiptMessage;
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
package com.nu.modules.systemorder.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.nu.modules.systemorder.entity.SystemOrder;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 系统订单表
|
||||
* @Author: 张明远
|
||||
* @Date: 2025-05-30
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface SystemOrderMapper extends BaseMapper<SystemOrder> {
|
||||
|
||||
}
|
|
@ -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.systemorder.mapper.SystemOrderMapper">
|
||||
|
||||
</mapper>
|
|
@ -0,0 +1,14 @@
|
|||
package com.nu.modules.systemorder.service;
|
||||
|
||||
import com.nu.modules.systemorder.entity.SystemOrder;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @Description: 系统订单表
|
||||
* @Author: 张明远
|
||||
* @Date: 2025-05-30
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface ISystemOrderService extends IService<SystemOrder> {
|
||||
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
package com.nu.modules.systemorder.service.impl;
|
||||
|
||||
import com.nu.modules.systemorder.entity.SystemOrder;
|
||||
import com.nu.modules.systemorder.mapper.SystemOrderMapper;
|
||||
import com.nu.modules.systemorder.service.ISystemOrderService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
/**
|
||||
* @Description: 系统订单表
|
||||
* @Author: 张明远
|
||||
* @Date: 2025-05-30
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class SystemOrderServiceImpl extends ServiceImpl<SystemOrderMapper, SystemOrder> implements ISystemOrderService {
|
||||
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<groupId>com.nursingunit.boot</groupId>
|
||||
<artifactId>nursing-unit-parent</artifactId>
|
||||
<version>2.0.0</version>
|
||||
</parent>
|
||||
<description>支付功能模块</description>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>nursing-unit-payment</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<modules>
|
||||
<module>nu-payment-api</module>
|
||||
<module>nu-payment-biz</module>
|
||||
</modules>
|
||||
|
||||
</project>
|
|
@ -58,6 +58,7 @@ public class SysCategoryController {
|
|||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param sysCategory
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
|
@ -69,9 +70,6 @@ public class SysCategoryController {
|
|||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
if(oConvertUtils.isEmpty(sysCategory.getPid())){
|
||||
sysCategory.setPid("0");
|
||||
}
|
||||
Result<IPage<SysCategory>> result = new Result<IPage<SysCategory>>();
|
||||
//------------------------------------------------------------------------------------------------
|
||||
//是否开启系统管理模块的多租户数据隔离【SAAS多租户模式】
|
||||
|
@ -87,7 +85,7 @@ public class SysCategoryController {
|
|||
String code = sysCategory.getCode();
|
||||
//QueryWrapper<SysCategory> queryWrapper = new QueryWrapper<SysCategory>();
|
||||
if (StringUtils.isBlank(name) && StringUtils.isBlank(code)) {
|
||||
queryWrapper.eq("pid", sysCategory.getPid());
|
||||
queryWrapper.eq("pid","0");
|
||||
}
|
||||
//--author:liusq---date:20211119 -----for: 分类字典页面查询条件配置--------end
|
||||
//--author:os_chengtgen---date:20190804 -----for:【vue3】 分类字典页面显示错误,issues:377--------end
|
||||
|
@ -109,6 +107,7 @@ public class SysCategoryController {
|
|||
//------------------------------------------------------------------------------------------------
|
||||
Result<List<SysCategory>> result = new Result<List<SysCategory>>();
|
||||
QueryWrapper<SysCategory> queryWrapper = QueryGenerator.initQueryWrapper(sysCategory, req.getParameterMap());
|
||||
queryWrapper.orderByAsc("code");
|
||||
List<SysCategory> list = sysCategoryService.list(queryWrapper);
|
||||
result.setSuccess(true);
|
||||
result.setResult(list);
|
||||
|
@ -118,6 +117,7 @@ public class SysCategoryController {
|
|||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param sysCategory
|
||||
* @return
|
||||
*/
|
||||
|
@ -129,13 +129,14 @@ public class SysCategoryController {
|
|||
result.success("添加成功!");
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
result.error500("操作失败");
|
||||
result.error500("编码重复!");
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param sysCategory
|
||||
* @return
|
||||
*/
|
||||
|
@ -144,7 +145,7 @@ public class SysCategoryController {
|
|||
Result<SysCategory> result = new Result<SysCategory>();
|
||||
SysCategory sysCategoryEntity = sysCategoryService.getById(sysCategory.getId());
|
||||
if (sysCategoryEntity == null) {
|
||||
result.error500("未找到对应实体");
|
||||
result.error500("编码重复!");
|
||||
} else {
|
||||
sysCategoryService.updateSysCategory(sysCategory);
|
||||
result.success("修改成功!");
|
||||
|
@ -154,6 +155,7 @@ public class SysCategoryController {
|
|||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
|
@ -173,6 +175,7 @@ public class SysCategoryController {
|
|||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
|
@ -190,6 +193,7 @@ public class SysCategoryController {
|
|||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
|
@ -313,7 +317,6 @@ public class SysCategoryController {
|
|||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 加载单个数据 用于回显
|
||||
*/
|
||||
|
@ -375,7 +378,10 @@ public class SysCategoryController {
|
|||
try {
|
||||
List<TreeSelectModel> ls = this.sysCategoryService.queryListByCode(pcode);
|
||||
if (!async) {
|
||||
loadAllCategoryChildren(ls);
|
||||
//框架自带傻逼for循环套sql 慎用 慢到想骂人 实测几百个非叶节点就已经爆炸了
|
||||
// loadAllCategoryChildren(ls);
|
||||
//一次sql查所有,系统代码处理循环生成树结构
|
||||
loadAllCategoryChildrenQO(ls);
|
||||
}
|
||||
result.setResult(ls);
|
||||
result.setSuccess(true);
|
||||
|
@ -400,8 +406,46 @@ public class SysCategoryController {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 只查询一次数据库,代码内容循环处理,避免for-sql
|
||||
*
|
||||
* @param ls
|
||||
*/
|
||||
private void loadAllCategoryChildrenQO(List<TreeSelectModel> ls) {
|
||||
// 1. 首先获取所有可能的pid值
|
||||
Set<String> pids = new HashSet<>();
|
||||
for (TreeSelectModel tsm : ls) {
|
||||
pids.add(tsm.getKey());
|
||||
}
|
||||
|
||||
// 2. 一次性查询所有可能需要的节点
|
||||
List<TreeSelectModel> allNodes = this.sysCategoryService.queryAllCategories();
|
||||
|
||||
// 3. 构建节点映射表
|
||||
Map<String, List<TreeSelectModel>> nodeMap = new HashMap<>();
|
||||
for (TreeSelectModel node : allNodes) {
|
||||
String parentId = node.getParentId();
|
||||
nodeMap.computeIfAbsent(parentId, k -> new ArrayList<>()).add(node);
|
||||
}
|
||||
|
||||
// 4. 递归构建树结构
|
||||
buildTree(ls, nodeMap);
|
||||
}
|
||||
|
||||
private void buildTree(List<TreeSelectModel> nodes, Map<String, List<TreeSelectModel>> nodeMap) {
|
||||
for (TreeSelectModel node : nodes) {
|
||||
String nodeKey = node.getKey();
|
||||
List<TreeSelectModel> children = nodeMap.get(nodeKey);
|
||||
if (children != null && !children.isEmpty()) {
|
||||
node.setChildren(children);
|
||||
buildTree(children, nodeMap);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验编码
|
||||
*
|
||||
* @param pid
|
||||
* @param code
|
||||
* @return
|
||||
|
@ -426,6 +470,7 @@ public class SysCategoryController {
|
|||
|
||||
/**
|
||||
* 分类字典树控件 加载节点
|
||||
*
|
||||
* @param pid
|
||||
* @param pcode
|
||||
* @param condition
|
||||
|
@ -488,6 +533,7 @@ public class SysCategoryController {
|
|||
|
||||
/**
|
||||
* [列表页面]加载分类字典数据 用于值的替换
|
||||
*
|
||||
* @param code
|
||||
* @return
|
||||
*/
|
||||
|
@ -515,6 +561,7 @@ public class SysCategoryController {
|
|||
|
||||
/**
|
||||
* 根据父级id批量查询子节点
|
||||
*
|
||||
* @param parentIds
|
||||
* @return
|
||||
*/
|
||||
|
|
|
@ -27,84 +27,155 @@ import java.util.Objects;
|
|||
public class SysDepart implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**ID*/
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private String id;
|
||||
/**父机构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;
|
||||
/**机构类别 1=公司,2=组织机构,3=岗位*/
|
||||
/**
|
||||
* 机构类别 1=公司,2=组织机构,3=岗位
|
||||
*/
|
||||
@Excel(name = "机构类别", width = 15, dicCode = "org_category")
|
||||
private String orgCategory;
|
||||
/**机构类型*/
|
||||
/**
|
||||
* 机构类型
|
||||
*/
|
||||
private String orgType;
|
||||
/**机构编码*/
|
||||
/**
|
||||
* 机构编码
|
||||
*/
|
||||
@Excel(name = "机构编码", width = 15)
|
||||
private String orgCode;
|
||||
/**协议+域名*/
|
||||
/**
|
||||
* 协议+域名
|
||||
*/
|
||||
@Excel(name = "协议+域名", width = 30)
|
||||
private String url;
|
||||
/**手机号*/
|
||||
/**
|
||||
* 省份
|
||||
*/
|
||||
@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 fax;
|
||||
/**地址*/
|
||||
/**
|
||||
* 地址
|
||||
*/
|
||||
@Excel(name = "地址", width = 15)
|
||||
private String address;
|
||||
/**备注*/
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@Excel(name = "备注", width = 15)
|
||||
private String memo;
|
||||
/**状态(1启用,0不启用)*/
|
||||
/**
|
||||
* 状态(1启用,0不启用)
|
||||
*/
|
||||
@Dict(dicCode = "depart_status")
|
||||
private String status;
|
||||
/**删除状态(0,正常,1已删除)*/
|
||||
/**
|
||||
* 删除状态(0,正常,1已删除)
|
||||
*/
|
||||
@Dict(dicCode = "del_flag")
|
||||
private String delFlag;
|
||||
/**对接企业微信的ID*/
|
||||
/**
|
||||
* 对接企业微信的ID
|
||||
*/
|
||||
private String qywxIdentifier;
|
||||
/**对接钉钉的部门ID*/
|
||||
/**
|
||||
* 对接钉钉的部门ID
|
||||
*/
|
||||
private String dingIdentifier;
|
||||
/**创建人*/
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
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;
|
||||
/**租户ID*/
|
||||
/**
|
||||
* 租户ID
|
||||
*/
|
||||
private java.lang.Integer tenantId;
|
||||
|
||||
/**是否有叶子节点: 1是0否*/
|
||||
/**
|
||||
* 是否有叶子节点: 1是0否
|
||||
*/
|
||||
private Integer izLeaf;
|
||||
|
||||
/**各机构服务器后台接口地址*/
|
||||
/**
|
||||
* 各机构服务器后台接口地址
|
||||
*/
|
||||
private String serverUrl;
|
||||
|
||||
//update-begin---author:wangshuai ---date:20200308 for:[JTC-119]在部门管理菜单下设置部门负责人,新增字段负责人ids和旧的负责人ids
|
||||
/**部门负责人的ids*/
|
||||
/**
|
||||
* 部门负责人的ids
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String directorUserIds;
|
||||
/**旧的部门负责人的ids(用于比较删除和新增)*/
|
||||
/**
|
||||
* 旧的部门负责人的ids(用于比较删除和新增)
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String oldDirectorUserIds;
|
||||
//update-end---author:wangshuai ---date:20200308 for:[JTC-119]新增字段负责人ids和旧的负责人ids
|
||||
|
@ -134,6 +205,10 @@ public class SysDepart implements Serializable {
|
|||
Objects.equals(orgCategory, depart.orgCategory) &&
|
||||
Objects.equals(orgType, depart.orgType) &&
|
||||
Objects.equals(orgCode, depart.orgCode) &&
|
||||
Objects.equals(url, depart.url) &&
|
||||
Objects.equals(province, depart.province) &&
|
||||
Objects.equals(city, depart.city) &&
|
||||
Objects.equals(district, depart.district) &&
|
||||
Objects.equals(mobile, depart.mobile) &&
|
||||
Objects.equals(fax, depart.fax) &&
|
||||
Objects.equals(address, depart.address) &&
|
||||
|
@ -154,7 +229,7 @@ public class SysDepart implements Serializable {
|
|||
public int hashCode() {
|
||||
return Objects.hash(super.hashCode(), id, parentId, departName,
|
||||
departNameEn, departNameAbbr, departOrder, description, orgCategory,
|
||||
orgType, orgCode, mobile, fax, address, memo, status,
|
||||
orgType, orgCode, url, province, city, district, mobile, fax, address, memo, status,
|
||||
delFlag, createBy, createTime, updateBy, updateTime, tenantId);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -48,4 +48,6 @@ public interface SysCategoryMapper extends BaseMapper<SysCategory> {
|
|||
@InterceptorIgnore(tenantLine = "true")
|
||||
@Select("SELECT code FROM sys_category WHERE ID = #{id}")
|
||||
SysCategory selectSysCategoryById(@Param("id") String id);
|
||||
|
||||
List<TreeSelectModel> queryAllCategories();
|
||||
}
|
||||
|
|
|
@ -33,5 +33,12 @@
|
|||
</if>
|
||||
</select>
|
||||
|
||||
|
||||
<select id="queryAllCategories" resultType="org.jeecg.modules.system.model.TreeSelectModel">
|
||||
select code,
|
||||
name as "title",
|
||||
id as "key",
|
||||
(case when has_child = '1' then 0 else 1 end) as isLeaf,
|
||||
pid as parentId
|
||||
from sys_category
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
@ -61,6 +61,12 @@ public class SysDepartTreeModel implements Serializable {
|
|||
|
||||
private String url;
|
||||
|
||||
private String province;
|
||||
|
||||
private String city;
|
||||
|
||||
private String district;
|
||||
|
||||
private String mobile;
|
||||
|
||||
private String fax;
|
||||
|
@ -113,6 +119,9 @@ public class SysDepartTreeModel implements Serializable {
|
|||
this.orgType = sysDepart.getOrgType();
|
||||
this.orgCode = sysDepart.getOrgCode();
|
||||
this.url = sysDepart.getUrl();
|
||||
this.province = sysDepart.getProvince();
|
||||
this.city = sysDepart.getCity();
|
||||
this.district = sysDepart.getDistrict();
|
||||
this.mobile = sysDepart.getMobile();
|
||||
this.fax = sysDepart.getFax();
|
||||
this.address = sysDepart.getAddress();
|
||||
|
@ -372,6 +381,30 @@ public class SysDepartTreeModel implements Serializable {
|
|||
this.directorUserIds = directorUserIds;
|
||||
}
|
||||
|
||||
public String getProvince() {
|
||||
return province;
|
||||
}
|
||||
|
||||
public void setProvince(String province) {
|
||||
this.province = province;
|
||||
}
|
||||
|
||||
public String getCity() {
|
||||
return city;
|
||||
}
|
||||
|
||||
public void setCity(String city) {
|
||||
this.city = city;
|
||||
}
|
||||
|
||||
public String getDistrict() {
|
||||
return district;
|
||||
}
|
||||
|
||||
public void setDistrict(String district) {
|
||||
this.district = district;
|
||||
}
|
||||
|
||||
/**
|
||||
* 重写equals方法
|
||||
*/
|
||||
|
@ -395,6 +428,9 @@ public class SysDepartTreeModel implements Serializable {
|
|||
Objects.equals(orgType, model.orgType) &&
|
||||
Objects.equals(orgCode, model.orgCode) &&
|
||||
Objects.equals(url, model.url) &&
|
||||
Objects.equals(province, model.province) &&
|
||||
Objects.equals(city, model.city) &&
|
||||
Objects.equals(district, model.district) &&
|
||||
Objects.equals(mobile, model.mobile) &&
|
||||
Objects.equals(fax, model.fax) &&
|
||||
Objects.equals(address, model.address) &&
|
||||
|
@ -417,7 +453,7 @@ public class SysDepartTreeModel implements Serializable {
|
|||
public int hashCode() {
|
||||
|
||||
return Objects.hash(id, parentId, departName, departNameEn, departNameAbbr,
|
||||
departOrder, description, orgCategory, orgType, orgCode, url, mobile, fax, address,
|
||||
departOrder, description, orgCategory, orgType, orgCode, url, province, city, district, mobile, fax, address,
|
||||
memo, status, delFlag, qywxIdentifier, createBy, createTime, updateBy, updateTime,
|
||||
children, directorUserIds);
|
||||
}
|
||||
|
|
|
@ -51,6 +51,8 @@ public interface ISysCategoryService extends IService<SysCategory> {
|
|||
*/
|
||||
public List<TreeSelectModel> queryListByPid(String pid);
|
||||
|
||||
public List<TreeSelectModel> queryAllCategories();
|
||||
|
||||
/**
|
||||
* 根据pid查询子节点集合,支持查询条件
|
||||
* @param pid
|
||||
|
|
|
@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.jeecg.common.constant.FillRuleConstant;
|
||||
import org.jeecg.common.constant.SymbolConstant;
|
||||
import org.jeecg.common.exception.JeecgBootException;
|
||||
|
@ -52,7 +53,9 @@ public class SysCategoryServiceImpl extends ServiceImpl<SysCategoryMapper, SysCa
|
|||
formData.put("pid", categoryPid);
|
||||
categoryCode = (String) FillRuleUtil.executeRule(FillRuleConstant.CATEGORY, formData);
|
||||
//update-end--Author:baihailong Date:20191209 for:分类字典编码规则生成器做成公用配置
|
||||
if (StringUtils.isBlank(sysCategory.getCode())) {
|
||||
sysCategory.setCode(categoryCode);
|
||||
}
|
||||
sysCategory.setPid(categoryPid);
|
||||
baseMapper.insert(sysCategory);
|
||||
}
|
||||
|
@ -96,6 +99,11 @@ public class SysCategoryServiceImpl extends ServiceImpl<SysCategoryMapper, SysCa
|
|||
return baseMapper.queryListByPid(pid, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<TreeSelectModel> queryAllCategories() {
|
||||
return baseMapper.queryAllCategories();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<TreeSelectModel> queryListByPid(String pid, Map<String, String> condition) {
|
||||
if (oConvertUtils.isEmpty(pid)) {
|
||||
|
@ -128,6 +136,7 @@ public class SysCategoryServiceImpl extends ServiceImpl<SysCategoryMapper, SysCa
|
|||
|
||||
/**
|
||||
* 查询节点下所有子节点
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
|
@ -151,6 +160,7 @@ public class SysCategoryServiceImpl extends ServiceImpl<SysCategoryMapper, SysCa
|
|||
|
||||
/**
|
||||
* 查询需修改标识的父节点ids
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
|
@ -184,6 +194,7 @@ public class SysCategoryServiceImpl extends ServiceImpl<SysCategoryMapper, SysCa
|
|||
|
||||
/**
|
||||
* 递归 根据父id获取子节点id
|
||||
*
|
||||
* @param pidVal
|
||||
* @param sb
|
||||
* @return
|
||||
|
|
|
@ -388,3 +388,18 @@ aliyun:
|
|||
accessKeySecret: pQBMT6TlUWgRfvvDnOu0IKVYXCfKee
|
||||
#文件传输秘钥
|
||||
downloadkey: hP2K9Z!WLuj"M#8,
|
||||
|
||||
# 微信支付
|
||||
wxpay:
|
||||
# APIv3密钥
|
||||
api-v3-key: asdfiuzwe3534565478WETDSAFRWEq1E
|
||||
# APPID
|
||||
appid: wx8fc3e4305d2fbf0b
|
||||
# 商户ID
|
||||
mch-id: 1717618860
|
||||
# 商户API证书序列号
|
||||
mch-serial-no: 3E51C9D24F64CE50E9273E544561D29684AB21C7
|
||||
# 接收结果通知地址
|
||||
notify-domain: https://www.focusnu.com/nursing-unit_0010507/weiXinPay/callback
|
||||
# 商户私钥文件路径
|
||||
private-key-path: /opt/nu001/apiclient_key.pem
|
||||
|
|
|
@ -249,8 +249,10 @@ jeecg:
|
|||
pc: http://localhost:3100
|
||||
app: http://localhost:8051
|
||||
path:
|
||||
#服务指令上传目录
|
||||
directivepath: /opt/upFiles001/directive
|
||||
#文件上传根目录 设置
|
||||
upload: /opt/upFiles
|
||||
upload: /opt/upFiles001
|
||||
#webapp文件路径
|
||||
webapp: /opt/webapp
|
||||
shiro:
|
||||
|
|
|
@ -247,6 +247,8 @@ jeecg:
|
|||
pc: http://localhost:3100
|
||||
app: http://localhost:8051
|
||||
path:
|
||||
#服务指令上传目录
|
||||
directivepath: /opt/upFiles001/directive
|
||||
#文件上传根目录 设置
|
||||
upload: /opt/nu001/upFiles
|
||||
#webapp文件路径
|
||||
|
|
Loading…
Reference in New Issue