1、调整媒体资源管理功能相关接口

2、增加系统配置查询接口
3、调整框架机构、部门编码生成方式
4、调整服务指令同步功能bug
This commit is contained in:
1378012178@qq.com 2025-06-19 15:03:56 +08:00
commit 6b4933280b
27 changed files with 1079 additions and 99 deletions

View File

@ -3,33 +3,41 @@ package com.nu.modules.wechart.controller;
import cn.hutool.core.util.IdUtil; import cn.hutool.core.util.IdUtil;
import cn.hutool.json.JSONObject; import cn.hutool.json.JSONObject;
import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.ObjectMapper;
import com.nu.modules.bizEmployeesInfo.entity.BizEmployeesInfo; import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import com.nu.modules.sysconfig.ISysConfigApi;
import com.nu.modules.systemorder.api.SystemOrderApi; import com.nu.modules.systemorder.api.SystemOrderApi;
import com.nu.modules.systemorder.entity.SystemOrderApiEntity; import com.nu.modules.systemorder.entity.SystemOrderApiEntity;
import com.nu.modules.wechart.entity.PayParam; import com.nu.modules.wechart.entity.PayParam;
import com.nu.modules.wechart.entity.WechatpayConfig; import com.nu.modules.wechart.entity.WechatpayConfig;
import com.wechat.pay.java.core.Config; import com.wechat.pay.java.core.Config;
import com.wechat.pay.java.core.RSAAutoCertificateConfig; import com.wechat.pay.java.core.RSAAutoCertificateConfig;
import com.wechat.pay.java.core.exception.ServiceException; import com.wechat.pay.java.core.exception.ServiceException;
import com.wechat.pay.java.core.notification.NotificationConfig; import com.wechat.pay.java.core.notification.NotificationConfig;
import com.wechat.pay.java.core.notification.NotificationParser; import com.wechat.pay.java.core.notification.NotificationParser;
import com.wechat.pay.java.core.notification.RequestParam;
import com.wechat.pay.java.service.payments.jsapi.JsapiService; import com.wechat.pay.java.service.payments.jsapi.JsapiService;
import com.wechat.pay.java.service.payments.jsapi.JsapiServiceExtension; import com.wechat.pay.java.service.payments.jsapi.JsapiServiceExtension;
import com.wechat.pay.java.service.payments.jsapi.model.*; import com.wechat.pay.java.service.payments.jsapi.model.*;
import com.wechat.pay.java.service.payments.model.Transaction; import com.wechat.pay.java.service.payments.model.Transaction;
import io.swagger.models.auth.In;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import org.apache.http.HttpEntity; import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.HttpStatus;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.CloseableHttpResponse; import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet; import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.impl.client.HttpClients; import org.apache.http.impl.client.HttpClients;
import org.apache.http.util.EntityUtils; import org.apache.http.util.EntityUtils;
import org.jeecg.common.system.api.ISysBaseAPI;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.ServletInputStream; import javax.servlet.ServletInputStream;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
@ -39,23 +47,13 @@ import java.io.BufferedReader;
import java.io.IOException; import java.io.IOException;
import java.io.InputStreamReader; import java.io.InputStreamReader;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.security.MessageDigest;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.Date; import java.util.Date;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
import java.util.UUID;
import com.wechat.pay.java.core.notification.RequestParam;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.HttpStatus;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.util.EntityUtils;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@RestController @RestController
@RequestMapping("/weiXinPay") @RequestMapping("/weiXinPay")
@ -65,6 +63,8 @@ public class WechatPayController {
public WechatpayConfig wechatpayConfig; public WechatpayConfig wechatpayConfig;
@Autowired @Autowired
private SystemOrderApi systemOrderApi; private SystemOrderApi systemOrderApi;
@Autowired
private ISysConfigApi sysConfigApi;
/** /**
* Native下单 * Native下单
@ -72,14 +72,16 @@ public class WechatPayController {
*/ */
@PostMapping("/native") @PostMapping("/native")
public Map<String, String> nativePay(@Valid @RequestBody PayParam params) throws Exception { public Map<String, String> nativePay(@Valid @RequestBody PayParam params) throws Exception {
//验证支付是否可用
{
com.alibaba.fastjson.JSONObject sysParams = sysConfigApi.getByKey("wechat_pay_enabled");
Boolean wechatPayEnabled = sysParams.getBoolean("configValue");
if (!wechatPayEnabled) {
throw new RuntimeException("微信支付已关闭");
}
}
Config config = Config config = new RSAAutoCertificateConfig.Builder().merchantId(wechatpayConfig.getMchId()).privateKeyFromPath(wechatpayConfig.getPrivateKeyPath()).merchantSerialNumber(wechatpayConfig.getMchSerialNo()).apiV3Key(wechatpayConfig.getApiV3Key()).build();
new RSAAutoCertificateConfig.Builder()
.merchantId(wechatpayConfig.getMchId())
.privateKeyFromPath(wechatpayConfig.getPrivateKeyPath())
.merchantSerialNumber(wechatpayConfig.getMchSerialNo())
.apiV3Key(wechatpayConfig.getApiV3Key())
.build();
// 构建service // 构建service
JsapiService service = new JsapiService.Builder().config(config).build(); JsapiService service = new JsapiService.Builder().config(config).build();
PrepayRequest request = new PrepayRequest(); PrepayRequest request = new PrepayRequest();
@ -127,7 +129,6 @@ public class WechatPayController {
systemOrderApiEntity.setOrderName(title);//订单名称必传 systemOrderApiEntity.setOrderName(title);//订单名称必传
systemOrderApiEntity.setOrderDescription(orderDesc);//订单描述非必传 systemOrderApiEntity.setOrderDescription(orderDesc);//订单描述非必传
systemOrderApiEntity.setOutTradeNo(outTradeNo);//商户订单号 systemOrderApiEntity.setOutTradeNo(outTradeNo);//商户订单号
systemOrderApiEntity.setTransactionId(response.getPrepayId());//微信支付订单号
systemOrderApiEntity.setOrderTime(new Date());//下单时间 systemOrderApiEntity.setOrderTime(new Date());//下单时间
systemOrderApiEntity.setOrderStatus("created");//订单状态 systemOrderApiEntity.setOrderStatus("created");//订单状态
systemOrderApi.save(systemOrderApiEntity); systemOrderApi.save(systemOrderApiEntity);
@ -159,13 +160,7 @@ public class WechatPayController {
public String courseNative(HttpServletRequest request, HttpServletResponse response) { public String courseNative(HttpServletRequest request, HttpServletResponse response) {
System.out.println("11111111111111"); System.out.println("11111111111111");
NotificationConfig config = NotificationConfig config = new RSAAutoCertificateConfig.Builder().merchantId(wechatpayConfig.getMchId()).apiV3Key(wechatpayConfig.getApiV3Key()).merchantSerialNumber(wechatpayConfig.getMchSerialNo()).privateKeyFromPath(wechatpayConfig.getPrivateKeyPath()).build();
new RSAAutoCertificateConfig.Builder()
.merchantId(wechatpayConfig.getMchId())
.apiV3Key(wechatpayConfig.getApiV3Key())
.merchantSerialNumber(wechatpayConfig.getMchSerialNo())
.privateKeyFromPath(wechatpayConfig.getPrivateKeyPath())
.build();
System.out.println("222222222222222" + config); System.out.println("222222222222222" + config);
// 从请求头中获取信息 // 从请求头中获取信息
String timestamp = request.getHeader("Wechatpay-Timestamp"); String timestamp = request.getHeader("Wechatpay-Timestamp");
@ -181,14 +176,7 @@ public class WechatPayController {
// 初始化解析器 NotificationParser // 初始化解析器 NotificationParser
NotificationParser parser = new NotificationParser(config); NotificationParser parser = new NotificationParser(config);
System.out.println("444444444444444444444" + parser); System.out.println("444444444444444444444" + parser);
RequestParam requestParam = new RequestParam.Builder() RequestParam requestParam = new RequestParam.Builder().serialNumber(wechatPayCertificateSerialNumber).nonce(nonce).signature(signature).timestamp(timestamp).signType(singType).body(requestBody).build();
.serialNumber(wechatPayCertificateSerialNumber)
.nonce(nonce)
.signature(signature)
.timestamp(timestamp)
.signType(singType)
.body(requestBody)
.build();
System.out.println("555555555555555555555" + requestParam); System.out.println("555555555555555555555" + requestParam);
try { try {
// 这个Transaction是微信包里面的 // 这个Transaction是微信包里面的
@ -214,12 +202,19 @@ public class WechatPayController {
//系统订单表状态更新 //系统订单表状态更新
{ {
SystemOrderApiEntity systemOrderApiEntity = new SystemOrderApiEntity(); SystemOrderApiEntity systemOrderApiEntity = new SystemOrderApiEntity();
systemOrderApiEntity.setOutTradeNo(decryptObject.getOutTradeNo());//商户订单号
systemOrderApiEntity.setTransactionId(decryptObject.getTransactionId());//微信支付订单号 systemOrderApiEntity.setTransactionId(decryptObject.getTransactionId());//微信支付订单号
systemOrderApiEntity.setOrderStatus(decryptObject.getTradeState().name());//支付状态 systemOrderApiEntity.setOrderStatus(decryptObject.getTradeState().name());//支付状态
systemOrderApiEntity.setReceiptDescription(decryptObject.getTradeStateDesc());//回执描述 systemOrderApiEntity.setReceiptDescription(decryptObject.getTradeStateDesc());//回执描述
systemOrderApiEntity.setReceiptMessage(new ObjectMapper().writeValueAsString(decryptObject));//回执报文 systemOrderApiEntity.setReceiptMessage(new ObjectMapper().writeValueAsString(decryptObject));//回执报文
systemOrderApiEntity.setReceiptTime(new Date()); systemOrderApiEntity.setReceiptTime(new Date());
systemOrderApi.updateByTransactionId(systemOrderApiEntity); systemOrderApi.updateByOutTradeNo(systemOrderApiEntity);
//如果订单支付成功则向表中插入定时任务
if ("SUCCESS".equals(decryptObject.getTradeState().name())) {
SystemOrderApiEntity systemOrder = systemOrderApi.selectByOutTradeNo(decryptObject.getOutTradeNo());
}
} }
return decryptObject.getTradeState().toString(); return decryptObject.getTradeState().toString();
} catch (Exception e) { } catch (Exception e) {
@ -232,10 +227,7 @@ public class WechatPayController {
// 获取请求头里的数据 // 获取请求头里的数据
private String getRequestBody(HttpServletRequest request) { private String getRequestBody(HttpServletRequest request) {
StringBuffer sb = new StringBuffer(); StringBuffer sb = new StringBuffer();
try ( try (ServletInputStream inputStream = request.getInputStream(); BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream));) {
ServletInputStream inputStream = request.getInputStream();
BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream));
) {
String line; String line;
while ((line = reader.readLine()) != null) { while ((line = reader.readLine()) != null) {
sb.append(line); sb.append(line);
@ -256,13 +248,7 @@ public class WechatPayController {
public Map<String, Object> queryOrderById(@RequestBody Map<String, String> params) throws Exception { public Map<String, Object> queryOrderById(@RequestBody Map<String, String> params) throws Exception {
Config config = Config config = new RSAAutoCertificateConfig.Builder().merchantId(wechatpayConfig.getMchId()).privateKeyFromPath(wechatpayConfig.getPrivateKeyPath()).merchantSerialNumber(wechatpayConfig.getMchSerialNo()).apiV3Key(wechatpayConfig.getApiV3Key()).build();
new RSAAutoCertificateConfig.Builder()
.merchantId(wechatpayConfig.getMchId())
.privateKeyFromPath(wechatpayConfig.getPrivateKeyPath())
.merchantSerialNumber(wechatpayConfig.getMchSerialNo())
.apiV3Key(wechatpayConfig.getApiV3Key())
.build();
String prepay_id = params.get("prepay_id"); String prepay_id = params.get("prepay_id");
Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
if (StringUtils.isEmpty(prepay_id)) { if (StringUtils.isEmpty(prepay_id)) {
@ -294,9 +280,7 @@ public class WechatPayController {
// 获取token // 获取token
public static String getToken(String apiurl, String appid, String secret) { public static String getToken(String apiurl, String appid, String secret) {
String turl = String.format( String turl = String.format("%s?grant_type=client_credential&appid=%s&secret=%s", apiurl, appid, secret);
"%s?grant_type=client_credential&appid=%s&secret=%s", apiurl,
appid, secret);
System.out.println("turl:" + turl); System.out.println("turl:" + turl);
HttpClient client = new DefaultHttpClient(); HttpClient client = new DefaultHttpClient();
HttpGet get = new HttpGet(turl); HttpGet get = new HttpGet(turl);
@ -310,8 +294,7 @@ public class WechatPayController {
HttpEntity entity = res.getEntity(); HttpEntity entity = res.getEntity();
System.out.println("entity:" + entity); System.out.println("entity:" + entity);
responseContent = EntityUtils.toString(entity, "UTF-8"); responseContent = EntityUtils.toString(entity, "UTF-8");
JsonObject json = jsonparer.parse(responseContent) JsonObject json = jsonparer.parse(responseContent).getAsJsonObject();
.getAsJsonObject();
System.out.println("json:" + json); System.out.println("json:" + json);
// 将json字符串转换为json对象 // 将json字符串转换为json对象
if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
@ -355,4 +338,66 @@ public class WechatPayController {
System.out.println("---------jsonObject-------" + jsonObject); System.out.println("---------jsonObject-------" + jsonObject);
return jsonObject; return jsonObject;
} }
@PostMapping("/getJsApiInfo")
public static Map<String, String> getJsApiInfo(@RequestBody Map<String, String> params) throws Exception {
// String accessToken = getToken(GET_TOKEN_URL, "wx8fc3e4305d2fbf0b", "3bf3dd4ec72f591432db6b28c2c044e5");// 获取token
String accessToken = params.get("access_token");
System.out.println("---------token-------" + accessToken);
// 构造请求URL
String requestUrl = "https://api.weixin.qq.com/cgi-bin/ticket/getticket?access_token=" + accessToken + "&type=jsapi";
// 发送HTTP请求并获取返回结果
HttpGet httpGet = new HttpGet(requestUrl);
System.out.println("---------httpGet-------" + httpGet);
CloseableHttpClient httpClient = HttpClients.createDefault();
System.out.println("---------httpClient-------" + httpClient);
CloseableHttpResponse httpResponse = httpClient.execute(httpGet);
System.out.println("---------httpResponse-------" + httpResponse);
HttpEntity httpEntity = httpResponse.getEntity();
System.out.println("---------httpEntity-------" + httpEntity);
String responseJson = EntityUtils.toString(httpEntity, "UTF-8");
System.out.println("---------responseJson-------" + responseJson);
// 解析返回结果获取手机号
JSONObject jsonObject = new JSONObject(responseJson);
String ticket = String.valueOf(jsonObject.get("ticket"));
String nonceStr = UUID.randomUUID().toString();
String timestamp = Long.toString(System.currentTimeMillis() / 1000);
String string1 = new StringBuilder("jsapi_ticket=").append(ticket).append("&noncestr=").append(nonceStr).append("&timestamp=").append(timestamp).toString();// 得到签名
String signature = encryptSHA(string1);
Map<String, String> map = new HashMap<String, String>();
map.put("signature", signature);
map.put("timestamp", timestamp);
map.put("nonceStr", nonceStr);
System.out.println("---------jsonObject-------" + signature);
return map;
}
/**
* sha
*/
private static String encryptSHA(String signStr) {
StringBuffer hexValue = new StringBuffer();
try {
MessageDigest sha = MessageDigest.getInstance("SHA-1");
byte[] byteArray = signStr.getBytes("UTF-8");
byte[] md5Bytes = sha.digest(byteArray);
for (int i = 0; i < md5Bytes.length; i++) {
int val = ((int) md5Bytes[i]) & 0xff;
if (val < 16) {
hexValue.append("0");
}
hexValue.append(Integer.toHexString(val));
}
} catch (Exception e) {
e.printStackTrace();
return "";
}
return hexValue.toString();
}
} }

View File

@ -3,6 +3,7 @@ package com.nu.modules.commonutils;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.google.common.collect.Maps; import com.google.common.collect.Maps;
import org.jeecg.common.api.vo.Result; import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.system.api.ISysBaseAPI; import org.jeecg.common.system.api.ISysBaseAPI;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy; import org.springframework.context.annotation.Lazy;

View File

@ -3,6 +3,7 @@ package com.nu.modules.documentrecognition;
import com.aliyun.sdk.service.ocr_api20210707.models.*; import com.aliyun.sdk.service.ocr_api20210707.models.*;
import com.nu.modules.aliyun.documentrecognition.DocumentRecognitionUtils; import com.nu.modules.aliyun.documentrecognition.DocumentRecognitionUtils;
import org.jeecg.common.api.vo.Result; import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;

View File

@ -10,6 +10,7 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.api.vo.Result; 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.base.controller.JeecgController;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
@ -40,7 +41,6 @@ public class AppCameraInfoController extends JeecgController<AppCameraInfo, IApp
* @param req * @param req
* @return * @return
*/ */
//@AutoLog(value = "护理单元-物联管理-摄像头信息-分页列表查询")
@ApiOperation(value="护理单元-物联管理-摄像头信息-分页列表查询", notes="护理单元-物联管理-摄像头信息-分页列表查询") @ApiOperation(value="护理单元-物联管理-摄像头信息-分页列表查询", notes="护理单元-物联管理-摄像头信息-分页列表查询")
@GetMapping(value = "/list") @GetMapping(value = "/list")
public Result<IPage<AppCameraInfo>> queryPageList(AppCameraInfo CameraInfo, public Result<IPage<AppCameraInfo>> queryPageList(AppCameraInfo CameraInfo,

View File

@ -14,7 +14,7 @@ public class YouBianCodeUtil {
// 数字位数(默认生成3位的数字) // 数字位数(默认生成3位的数字)
/**代表数字位数*/ /**代表数字位数*/
private static final int NUM_LENGTH = 2; private static final int NUM_LENGTH = 3;
public static final int ZHANWEI_LENGTH = 1+ NUM_LENGTH; public static final int ZHANWEI_LENGTH = 1+ NUM_LENGTH;
@ -34,6 +34,9 @@ public class YouBianCodeUtil {
String num = getStrNum(1); String num = getStrNum(1);
newcode = zimu + num; newcode = zimu + num;
} else { } else {
if(!code.startsWith("A")){
code = "A"+code;
}
String beforeCode = code.substring(0, code.length() - 1- NUM_LENGTH); String beforeCode = code.substring(0, code.length() - 1- NUM_LENGTH);
String afterCode = code.substring(code.length() - 1 - NUM_LENGTH,code.length()); String afterCode = code.substring(code.length() - 1 - NUM_LENGTH,code.length());
char afterCodeZimu = afterCode.substring(0, 1).charAt(0); char afterCodeZimu = afterCode.substring(0, 1).charAt(0);
@ -83,10 +86,11 @@ public class YouBianCodeUtil {
if(localCode!=null && localCode!=""){ if(localCode!=null && localCode!=""){
// return parentCode + getNextYouBianCode(localCode); // return parentCode + getNextYouBianCode(localCode);
return getNextYouBianCode(localCode); return getNextYouBianCode(localCode).replace("A","");
}else{ }else{
parentCode = parentCode + "A"+ getNextStrNum(0); // parentCode = parentCode + "A"+ getNextStrNum(0);
parentCode = parentCode + getNextStrNum(0);
} }
return parentCode; return parentCode;
} }

View File

@ -12,5 +12,12 @@ public interface SystemOrderApi {
* @param systemOrder * @param systemOrder
* @return * @return
*/ */
int updateByTransactionId(SystemOrderApiEntity systemOrder); int updateByOutTradeNo(SystemOrderApiEntity systemOrder);
/**
* 根据商户订单号查询数据
* @param outTradeNo
* @return
*/
SystemOrderApiEntity selectByOutTradeNo(String outTradeNo);
} }

View File

@ -28,9 +28,17 @@ public class SystemOrderServiceImpl extends ServiceImpl<SystemOrderMapper, Syste
} }
@Override @Override
public int updateByTransactionId(SystemOrderApiEntity systemOrderApiEntity) { public int updateByOutTradeNo(SystemOrderApiEntity systemOrderApiEntity) {
SystemOrder systemOrder = new SystemOrder(); SystemOrder systemOrder = new SystemOrder();
BeanUtils.copyProperties(systemOrderApiEntity,systemOrder); BeanUtils.copyProperties(systemOrderApiEntity,systemOrder);
return baseMapper.update(systemOrder,new QueryWrapper<SystemOrder>().eq("transaction_id",systemOrderApiEntity.getTransactionId())); return baseMapper.update(systemOrder,new QueryWrapper<SystemOrder>().eq("out_trade_no",systemOrderApiEntity.getOutTradeNo()));
}
@Override
public SystemOrderApiEntity selectByOutTradeNo(String outTradeNo) {
SystemOrder systemOrder = baseMapper.selectOne(new QueryWrapper<SystemOrder>().eq("out_trade_no", outTradeNo));
SystemOrderApiEntity systemOrderApiEntity = new SystemOrderApiEntity();
BeanUtils.copyProperties(systemOrder,systemOrderApiEntity);
return systemOrderApiEntity;
} }
} }

View File

@ -20,6 +20,7 @@ import org.apache.commons.lang.StringUtils;
import org.jeecg.common.system.api.ISysBaseAPI; import org.jeecg.common.system.api.ISysBaseAPI;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import java.util.*; import java.util.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@ -62,6 +63,7 @@ public class ConfigServiceDirectiveServiceImpl extends ServiceImpl<ConfigService
{ {
List<String> meidsIds = list.stream().flatMap(directive -> Stream.of(directive.getMp3File(), directive.getMp4File(), directive.getPreviewFile(), directive.getImmediateFile())).filter(Objects::nonNull).distinct().collect(Collectors.toList()); List<String> meidsIds = list.stream().flatMap(directive -> Stream.of(directive.getMp3File(), directive.getMp4File(), directive.getPreviewFile(), directive.getImmediateFile())).filter(Objects::nonNull).distinct().collect(Collectors.toList());
if (!CollectionUtils.isEmpty(meidsIds)) {
List<JSONObject> mediaObjs = mediaManageApi.queryByIds(meidsIds); List<JSONObject> mediaObjs = mediaManageApi.queryByIds(meidsIds);
Map<String, String> idToFilePathMap = mediaObjs.stream().collect(Collectors.toMap(media -> media.getStr("id"), media -> media.getStr("filePath"))); Map<String, String> idToFilePathMap = mediaObjs.stream().collect(Collectors.toMap(media -> media.getStr("id"), media -> media.getStr("filePath")));
@ -74,6 +76,7 @@ public class ConfigServiceDirectiveServiceImpl extends ServiceImpl<ConfigService
}); });
} }
} }
}
//处理单元格合并所需数据 //处理单元格合并所需数据
merge(list); merge(list);
@ -334,7 +337,7 @@ public class ConfigServiceDirectiveServiceImpl extends ServiceImpl<ConfigService
@Override @Override
public List<JSONObject> selectMediaList(String dataSourceCode, List<String> idList) { public List<JSONObject> selectMediaList(String dataSourceCode, List<String> idList) {
return mediaManageApi.selectByDirectiveIds(dataSourceCode,idList); return mediaManageApi.selectByDirectiveIds(dataSourceCode, idList);
} }
} }

View File

@ -11,6 +11,7 @@ import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
import java.util.Objects; import java.util.Objects;
@ -79,6 +80,30 @@ public class SysDepart implements Serializable {
*/ */
@Excel(name = "协议+域名", width = 30) @Excel(name = "协议+域名", width = 30)
private String url; private String url;
/**
* 运营开始时间
*/
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern = "yyyy-MM-dd")
private Date operationStartTime;
/**
* 运营到期时间
*/
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern = "yyyy-MM-dd")
private Date operationEndTime;
/**
* 合同开始时间
*/
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern = "yyyy-MM-dd")
private Date contractStartTime;
/**
* 合同到期时间
*/
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern = "yyyy-MM-dd")
private Date contractEndTime;
/** /**
* 省份 * 省份
*/ */
@ -124,6 +149,11 @@ public class SysDepart implements Serializable {
*/ */
@Dict(dicCode = "del_flag") @Dict(dicCode = "del_flag")
private String delFlag; private String delFlag;
/**
* 应缴金额
*/
@Excel(name = "应缴金额", width = 15)
private BigDecimal payableAmount;
/** /**
* 对接企业微信的ID * 对接企业微信的ID
*/ */
@ -206,6 +236,10 @@ public class SysDepart implements Serializable {
Objects.equals(orgType, depart.orgType) && Objects.equals(orgType, depart.orgType) &&
Objects.equals(orgCode, depart.orgCode) && Objects.equals(orgCode, depart.orgCode) &&
Objects.equals(url, depart.url) && Objects.equals(url, depart.url) &&
Objects.equals(operationStartTime, depart.operationStartTime) &&
Objects.equals(operationEndTime, depart.operationEndTime) &&
Objects.equals(contractStartTime, depart.contractStartTime) &&
Objects.equals(contractEndTime, depart.contractEndTime) &&
Objects.equals(province, depart.province) && Objects.equals(province, depart.province) &&
Objects.equals(city, depart.city) && Objects.equals(city, depart.city) &&
Objects.equals(district, depart.district) && Objects.equals(district, depart.district) &&
@ -219,6 +253,7 @@ public class SysDepart implements Serializable {
Objects.equals(createTime, depart.createTime) && Objects.equals(createTime, depart.createTime) &&
Objects.equals(updateBy, depart.updateBy) && Objects.equals(updateBy, depart.updateBy) &&
Objects.equals(tenantId, depart.tenantId) && Objects.equals(tenantId, depart.tenantId) &&
Objects.equals(payableAmount, depart.payableAmount) &&
Objects.equals(updateTime, depart.updateTime); Objects.equals(updateTime, depart.updateTime);
} }
@ -229,7 +264,8 @@ public class SysDepart implements Serializable {
public int hashCode() { public int hashCode() {
return Objects.hash(super.hashCode(), id, parentId, departName, return Objects.hash(super.hashCode(), id, parentId, departName,
departNameEn, departNameAbbr, departOrder, description, orgCategory, departNameEn, departNameAbbr, departOrder, description, orgCategory,
orgType, orgCode, url, province, city, district, mobile, fax, address, memo, status, orgType, orgCode, url, operationStartTime, operationEndTime, contractStartTime,
delFlag, createBy, createTime, updateBy, updateTime, tenantId); contractEndTime, province, city, district, mobile, fax, address, memo, status,
delFlag, createBy, createTime, updateBy, updateTime, tenantId, payableAmount);
} }
} }

View File

@ -3,6 +3,7 @@ package org.jeecg.modules.system.model;
import org.jeecg.modules.system.entity.SysDepart; import org.jeecg.modules.system.entity.SysDepart;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
@ -61,6 +62,14 @@ public class SysDepartTreeModel implements Serializable {
private String url; private String url;
private Date operationStartTime;
private Date operationEndTime;
private Date contractStartTime;
private Date contractEndTime;
private String province; private String province;
private String city; private String city;
@ -81,6 +90,8 @@ public class SysDepartTreeModel implements Serializable {
private String qywxIdentifier; private String qywxIdentifier;
private BigDecimal payableAmount;
private String createBy; private String createBy;
private Date createTime; private Date createTime;
@ -119,6 +130,10 @@ public class SysDepartTreeModel implements Serializable {
this.orgType = sysDepart.getOrgType(); this.orgType = sysDepart.getOrgType();
this.orgCode = sysDepart.getOrgCode(); this.orgCode = sysDepart.getOrgCode();
this.url = sysDepart.getUrl(); this.url = sysDepart.getUrl();
this.operationStartTime = sysDepart.getOperationStartTime();
this.operationEndTime = sysDepart.getOperationEndTime();
this.contractStartTime = sysDepart.getContractStartTime();
this.contractEndTime = sysDepart.getContractEndTime();
this.province = sysDepart.getProvince(); this.province = sysDepart.getProvince();
this.city = sysDepart.getCity(); this.city = sysDepart.getCity();
this.district = sysDepart.getDistrict(); this.district = sysDepart.getDistrict();
@ -134,6 +149,7 @@ public class SysDepartTreeModel implements Serializable {
this.updateBy = sysDepart.getUpdateBy(); this.updateBy = sysDepart.getUpdateBy();
this.updateTime = sysDepart.getUpdateTime(); this.updateTime = sysDepart.getUpdateTime();
this.directorUserIds = sysDepart.getDirectorUserIds(); this.directorUserIds = sysDepart.getDirectorUserIds();
this.payableAmount = sysDepart.getPayableAmount();
if (0 == sysDepart.getIzLeaf()) { if (0 == sysDepart.getIzLeaf()) {
this.isLeaf = false; this.isLeaf = false;
} else { } else {
@ -405,6 +421,46 @@ public class SysDepartTreeModel implements Serializable {
this.district = district; this.district = district;
} }
public BigDecimal getPayableAmount() {
return payableAmount;
}
public void setPayableAmount(BigDecimal payableAmount) {
this.payableAmount = payableAmount;
}
public Date getOperationStartTime() {
return operationStartTime;
}
public void setOperationStartTime(Date operationStartTime) {
this.operationStartTime = operationStartTime;
}
public Date getOperationEndTime() {
return operationEndTime;
}
public void setOperationEndTime(Date operationEndTime) {
this.operationEndTime = operationEndTime;
}
public Date getContractStartTime() {
return contractStartTime;
}
public void setContractStartTime(Date contractStartTime) {
this.contractStartTime = contractStartTime;
}
public Date getContractEndTime() {
return contractEndTime;
}
public void setContractEndTime(Date contractEndTime) {
this.contractEndTime = contractEndTime;
}
/** /**
* 重写equals方法 * 重写equals方法
*/ */
@ -428,6 +484,10 @@ public class SysDepartTreeModel implements Serializable {
Objects.equals(orgType, model.orgType) && Objects.equals(orgType, model.orgType) &&
Objects.equals(orgCode, model.orgCode) && Objects.equals(orgCode, model.orgCode) &&
Objects.equals(url, model.url) && Objects.equals(url, model.url) &&
Objects.equals(operationStartTime, model.operationStartTime) &&
Objects.equals(operationEndTime, model.operationEndTime) &&
Objects.equals(contractStartTime, model.contractStartTime) &&
Objects.equals(contractEndTime, model.contractEndTime) &&
Objects.equals(province, model.province) && Objects.equals(province, model.province) &&
Objects.equals(city, model.city) && Objects.equals(city, model.city) &&
Objects.equals(district, model.district) && Objects.equals(district, model.district) &&
@ -443,6 +503,7 @@ public class SysDepartTreeModel implements Serializable {
Objects.equals(updateBy, model.updateBy) && Objects.equals(updateBy, model.updateBy) &&
Objects.equals(updateTime, model.updateTime) && Objects.equals(updateTime, model.updateTime) &&
Objects.equals(directorUserIds, model.directorUserIds) && Objects.equals(directorUserIds, model.directorUserIds) &&
Objects.equals(payableAmount, model.payableAmount) &&
Objects.equals(children, model.children); Objects.equals(children, model.children);
} }
@ -453,9 +514,10 @@ public class SysDepartTreeModel implements Serializable {
public int hashCode() { public int hashCode() {
return Objects.hash(id, parentId, departName, departNameEn, departNameAbbr, return Objects.hash(id, parentId, departName, departNameEn, departNameAbbr,
departOrder, description, orgCategory, orgType, orgCode, url, province, city, district, mobile, fax, address, departOrder, description, orgCategory, orgType, orgCode, operationStartTime,
memo, status, delFlag, qywxIdentifier, createBy, createTime, updateBy, updateTime, operationEndTime, contractStartTime, contractEndTime, url, province, city, district,
children, directorUserIds); mobile, fax, address, memo, status, delFlag, qywxIdentifier, createBy, createTime,
updateBy, updateTime, children, directorUserIds, payableAmount);
} }
} }

View File

@ -70,6 +70,7 @@ public class OrgCodeRule implements IFillRuleHandler {
oldOrgCode = depart.getOrgCode(); oldOrgCode = depart.getOrgCode();
orgType = depart.getOrgType(); orgType = depart.getOrgType();
newOrgCode = YouBianCodeUtil.getNextYouBianCode(oldOrgCode); newOrgCode = YouBianCodeUtil.getNextYouBianCode(oldOrgCode);
newOrgCode = newOrgCode.substring(1);
} }
} else {//反之则查询出所有同级的部门,获取结果后有两种情况,有同级和没有同级 } else {//反之则查询出所有同级的部门,获取结果后有两种情况,有同级和没有同级
//获取自己部门最大值orgCode部门信息 //获取自己部门最大值orgCode部门信息

View File

@ -60,6 +60,12 @@
<artifactId>nu-payment-biz</artifactId> <artifactId>nu-payment-biz</artifactId>
<version>${nursingunit.version}</version> <version>${nursingunit.version}</version>
</dependency> </dependency>
<!-- 任务 模块 -->
<dependency>
<groupId>com.nursingunit.boot</groupId>
<artifactId>nu-task-biz</artifactId>
<version>${nursingunit.version}</version>
</dependency>
<!-- 接口 模块 --> <!-- 接口 模块 -->
<dependency> <dependency>
<groupId>com.nursingunit.boot</groupId> <groupId>com.nursingunit.boot</groupId>

View File

@ -255,11 +255,11 @@ jeecg:
app: http://localhost:8051 app: http://localhost:8051
path: path:
#服务指令上传目录 #服务指令上传目录
directivepath: /opt/upFiles002/directive directivepath: /cache/nu/opt/upFiles002/directive
#文件上传根目录 设置 #文件上传根目录 设置
upload: /opt/upFiles002 upload: /cache/nu/opt/upFiles002
#webapp文件路径 #webapp文件路径
webapp: /opt/webapp002 webapp: /cache/nu/opt/webapp002
shiro: shiro:
excludeUrls: /test/jeecgDemo/demo3,/test/jeecgDemo/redisDemo/**,/bigscreen/category/**,/bigscreen/visual/**,/bigscreen/map/**,/jmreport/bigscreen2/** excludeUrls: /test/jeecgDemo/demo3,/test/jeecgDemo/redisDemo/**,/bigscreen/category/**,/bigscreen/visual/**,/bigscreen/map/**,/jmreport/bigscreen2/**
#阿里云oss存储和大鱼短信秘钥配置 #阿里云oss存储和大鱼短信秘钥配置

View File

@ -0,0 +1,405 @@
server:
port: 8083
tomcat:
max-swallow-size: -1
error:
include-exception: true
include-stacktrace: ALWAYS
include-message: ALWAYS
servlet:
context-path: /nursing-unit_003
compression:
enabled: true
min-response-size: 1024
mime-types: application/javascript,application/json,application/xml,text/html,text/xml,text/plain,text/css,image/*
management:
endpoints:
web:
exposure:
include: metrics,jeecghttptrace
spring:
application:
name: nursing-unit-003
config:
import:
- optional:nacos:${spring.application.name}.yaml # 你的服务专属配置
- optional:nacos:common-db.yaml
cloud:
nacos:
discovery:
server-addr: 192.168.2.199:8848 # 直接写死IP或保留${config.server-addr}
namespace: public
group: DEFAULT_GROUP
config:
server-addr: 192.168.2.199:8848
namespace: public
group: DEFAULT_GROUP
file-extension: yaml
# flyway配置
flyway:
# 是否启用flyway
enabled: false
# 编码格式默认UTF-8
encoding: UTF-8
# 迁移sql脚本文件存放路径官方默认db/migration
locations: classpath:flyway/sql/mysql
# 迁移sql脚本文件名称的前缀默认V
sql-migration-prefix: V
# 迁移sql脚本文件名称的分隔符默认2个下划线__
sql-migration-separator: __
# 避免带${}sql执行失败
placeholder-prefix: '#('
placeholder-suffix: )
# 迁移sql脚本文件名称的后缀
sql-migration-suffixes: .sql
# 迁移时是否进行校验默认true
validate-on-migrate: true
# 当迁移发现数据库非空且存在没有元数据的表时自动执行基准迁移新建schema_version表
baseline-on-migrate: true
# 是否关闭要清除已有库下的表功能,生产环境必须为true,否则会删库,非常重要!!!
clean-disabled: true
servlet:
multipart:
max-file-size: 100MB
max-request-size: 100MB
mail:
# 定时任务发送邮件
timeJobSend: false
host: smtp.163.com
username: jeecgos@163.com
password: ??
properties:
mail:
smtp:
auth: true
starttls:
enable: true
required: true
## quartz定时任务,采用数据库方式
quartz:
job-store-type: jdbc
initialize-schema: embedded
#定时任务启动开关true-开 false-关
auto-startup: true
#延迟1秒启动定时任务
startup-delay: 1s
#启动时更新己存在的Job
overwrite-existing-jobs: true
properties:
org:
quartz:
scheduler:
instanceName: MyScheduler
instanceId: AUTO
jobStore:
class: org.springframework.scheduling.quartz.LocalDataSourceJobStore
driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate
tablePrefix: QRTZ_
isClustered: false
misfireThreshold: 12000
clusterCheckinInterval: 0 #心跳检查 之前是15000
acquireTriggersWithinLock: false # 减少锁竞争
threadPool:
class: org.quartz.simpl.SimpleThreadPool
threadCount: 10
threadPriority: 5
threadsInheritContextClassLoaderOfInitializingThread: true
#json 时间戳统一转换
jackson:
date-format: yyyy-MM-dd HH:mm:ss
time-zone: GMT+8
jpa:
open-in-view: false
aop:
proxy-target-class: true
#配置freemarker
freemarker:
# 设置模板后缀名
suffix: .ftl
# 设置文档类型
content-type: text/html
# 设置页面编码格式
charset: UTF-8
# 设置页面缓存
cache: false
prefer-file-system-access: false
# 设置ftl文件路径
template-loader-path:
- classpath:/templates
template_update_delay: 0
# 设置静态文件路径js,css等
mvc:
static-path-pattern: /**
#Spring Boot 2.6+后映射匹配的默认策略已从AntPathMatcher更改为PathPatternParser,需要手动指定为ant-path-matcher
pathmatch:
matching-strategy: ant_path_matcher
resource:
static-locations: classpath:/static/,classpath:/public/
autoconfigure:
exclude:
- com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure
- org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration
datasource:
druid:
stat-view-servlet:
enabled: true
loginUsername: admin
loginPassword: 123456
allow:
web-stat-filter:
enabled: true
dynamic:
druid: # 全局druid参数绝大部分值和默认保持一致。(现已支持的参数如下,不清楚含义不要乱设置)
# 连接池的配置信息
# 初始化大小,最小,最大
initial-size: 5
min-idle: 5
maxActive: 1000
# 配置获取连接等待超时的时间
maxWait: 60000
# 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
timeBetweenEvictionRunsMillis: 60000
# 配置一个连接在池中最小生存的时间,单位是毫秒
minEvictableIdleTimeMillis: 3600000
validationQuery: SELECT 1
testWhileIdle: true
testOnBorrow: false
testOnReturn: false
# 打开PSCache并且指定每个连接上PSCache的大小
poolPreparedStatements: true
maxPoolPreparedStatementPerConnectionSize: 20
# 配置监控统计拦截的filters去掉后监控界面sql无法统计'wall'用于防火墙
filters: stat,wall,slf4j
# 允许SELECT语句的WHERE子句是一个永真条件
wall:
selectWhereAlwayTrueCheck: false
# 打开mergeSql功能慢SQL记录
stat:
merge-sql: true
slow-sql-millis: 5000
datasource:
master:
url: jdbc:mysql://192.168.2.199:3306/nursing_unit_003?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
username: nu003
password: nu003
driver-class-name: com.mysql.cj.jdbc.Driver
# 多数据源配置-运维系统
multi-datasource1:
url: jdbc:mysql://192.168.2.199:3306/nursing_unit?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
username: nu_sys
password: nu_sys
driver-class-name: com.mysql.cj.jdbc.Driver
# 多数据源配置-试验田
nuro:
url: jdbc:mysql://192.168.2.199:3306/nursing_unit_001?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
username: nu_ro
password: nu_ro
driver-class-name: com.mysql.cj.jdbc.Driver
#redis 配置
redis:
database: 0
host: 127.0.0.1
port: 6379
password:
#rabbitmq 配置
rabbitmq:
host: 192.168.2.199
prot: 5672
username: hldy
password: hldy
virtual-host: /hldy
#mybatis plus 设置
mybatis-plus:
mapper-locations: classpath*:org/jeecg/**/xml/*Mapper.xml,classpath*:com/nu/**/xml/*Mapper.xml
global-config:
# 关闭MP3.0自带的banner
banner: false
db-config:
#主键类型 0:"数据库ID自增",1:"该类型为未设置主键类型", 2:"用户输入ID",3:"全局唯一ID (数字类型唯一ID)", 4:"全局唯一ID UUID",5:"字符串全局唯一ID (idWorker 的字符串表示)";
id-type: ASSIGN_ID
# 默认数据库表下划线命名
table-underline: true
configuration:
# 这个配置会将执行的sql打印出来在开发或测试的时候可以用
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
# 返回类型为Map,显示null对应的字段
call-setters-on-nulls: true
#jeecg专用配置
minidao:
base-package: org.jeecg.modules.jmreport.*,org.jeecg.modules.drag.*
jeecg:
# AI集成
ai-chat:
enabled: true
model: deepseek-chat
apiKey: ??
apiHost: https://api.deepseek.com
timeout: 60
# 平台上线安全配置
firewall:
# 数据源安全 (开启后Online报表和图表的数据源为必填)
dataSourceSafe: false
# 低代码模式dev:开发模式prod:发布模式——关闭所有在线开发配置能力)
lowCodeMode: dev
# 签名密钥串(前后端要一致,正式发布请自行修改)
signatureSecret: dd05f1c54d63749eda95f9fa6d49v442a
#签名拦截接口
signUrls: /sys/dict/getDictItems/*,/sys/dict/loadDict/*,/sys/dict/loadDictOrderByValue/*,/sys/dict/loadDictItem/*,/sys/dict/loadTreeData,/sys/api/queryTableDictItemsByCode,/sys/api/queryFilterTableDictInfo,/sys/api/queryTableDictByKeys,/sys/api/translateDictFromTable,/sys/api/translateDictFromTableByKeys,/sys/sendChangePwdSms,/sys/user/sendChangePhoneSms,/sys/sms,/desform/api/sendVerifyCode
# 本地local、Miniominio、阿里云alioss
uploadType: local
# 前端访问地址
domainUrl:
pc: http://localhost:3100
app: http://localhost:8051
path:
#服务指令上传目录
directivepath: /cache/nu/opt/upFiles003/directive
#文件上传根目录 设置
upload: /cache/nu/opt/upFiles003
#webapp文件路径
webapp: /cache/nu/opt/webapp003
shiro:
excludeUrls: /test/jeecgDemo/demo3,/test/jeecgDemo/redisDemo/**,/bigscreen/category/**,/bigscreen/visual/**,/bigscreen/map/**,/jmreport/bigscreen2/**
#阿里云oss存储和大鱼短信秘钥配置
oss:
accessKey: ??
secretKey: ??
endpoint: oss-cn-beijing.aliyuncs.com
bucketName: jeecgdev
# 短信模板
sms-template:
# 签名
signature:
# 模板code
templateCode:
# 登录短信、忘记密码模板编码
SMS_175435174:
# 修改密码短信模板编码
SMS_465391221:
# 注册账号短信模板编码
SMS_175430166:
# 在线预览文件服务器地址配置
file-view-domain: http://fileview.jeecg.com
# minio文件上传
minio:
minio_url: http://minio.jeecg.com
minio_name: ??
minio_pass: ??
bucketName: otatest
#大屏报表参数设置
jmreport:
#多租户模式,默认值为空(created:按照创建人隔离、tenant:按照租户隔离) (v1.6.2+ 新增)
saasMode:
# 平台上线安全配置(v1.6.2+ 新增)
firewall:
# 数据源安全 (开启后不允许使用平台数据源、SQL解析加签并且不允许查询数据库)
dataSourceSafe: false
# 低代码开发模式dev:开发模式prod:发布模式—关闭在线报表设计功能分配角色admin、lowdeveloper可以放开限制
lowCodeMode: dev
#xxl-job配置
xxljob:
enabled: false
adminAddresses: http://127.0.0.1:9080/xxl-job-admin
appname: ${spring.application.name}
accessToken: ''
address: 127.0.0.1:30007
ip: 127.0.0.1
port: 30007
logPath: logs/jeecg/job/jobhandler/
logRetentionDays: 30
#分布式锁配置
redisson:
address: 127.0.0.1:6379
password:
type: STANDALONE
enabled: true
# 百度开放API配置
baidu-api:
app-id: ??
api-key: ??
secret-key: ??
# ElasticSearch 6设置
elasticsearch:
cluster-name: jeecg-ES
cluster-nodes: 127.0.0.1:9200
check-enabled: false
#cas单点登录
cas:
prefixUrl: http://cas.example.org:8443/cas
#Mybatis输出sql日志
logging:
level:
org.flywaydb: debug
org.jeecg.modules.system.mapper: info
com.nu.modules.system.mapper: info
#swagger
knife4j:
#开启增强配置
enable: true
#开启生产环境屏蔽
production: false
basic:
enable: false
username: jeecg
password: jeecg1314
#第三方登录
justauth:
enabled: true
type:
GITHUB:
client-id: ??
client-secret: ??
redirect-uri: http://sso.test.com:8080/jeecg-boot/sys/thirdLogin/github/callback
WECHAT_ENTERPRISE:
client-id: ??
client-secret: ??
redirect-uri: http://sso.test.com:8080/jeecg-boot/sys/thirdLogin/wechat_enterprise/callback
agent-id: ??
DINGTALK:
client-id: ??
client-secret: ??
redirect-uri: http://sso.test.com:8080/jeecg-boot/sys/thirdLogin/dingtalk/callback
WECHAT_OPEN:
client-id: ??
client-secret: ??
redirect-uri: http://sso.test.com:8080/jeecg-boot/sys/thirdLogin/wechat_open/callback
cache:
type: default
prefix: 'demo::'
timeout: 1h
#tplink登录信息
tplink:
tums:
url: https://121.36.88.64:8888
username: admin
password: Bl20230518
ftp:
ip: 1.92.152.160
port: 21
username: administrator
password: Root@123..
uploadpath: /
#zmy
aliyun:
ocr:
accessKeyId: LTAI5tMoCTt4sb9VQrcnZFsb
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

View File

@ -250,11 +250,11 @@ jeecg:
app: http://localhost:8051 app: http://localhost:8051
path: path:
#服务指令上传目录 #服务指令上传目录
directivepath: /opt/upFiles001/directive directivepath: /cache/nu/opt/upFiles001/directive
#文件上传根目录 设置 #文件上传根目录 设置
upload: /opt/upFiles001 upload: /cache/nu/opt/upFiles001
#webapp文件路径 #webapp文件路径
webapp: /opt/webapp webapp: /cache/nu/opt/webapp
shiro: shiro:
excludeUrls: /test/jeecgDemo/demo3,/test/jeecgDemo/redisDemo/**,/bigscreen/category/**,/bigscreen/visual/**,/bigscreen/map/**,/jmreport/bigscreen2/** excludeUrls: /test/jeecgDemo/demo3,/test/jeecgDemo/redisDemo/**,/bigscreen/category/**,/bigscreen/visual/**,/bigscreen/map/**,/jmreport/bigscreen2/**
#阿里云oss存储和大鱼短信秘钥配置 #阿里云oss存储和大鱼短信秘钥配置

View File

@ -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-task-api</artifactId>
<version>2.0.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>nu-task-local-api</artifactId>
</project>

View File

@ -0,0 +1,4 @@
package com.nu.modules.scheduledtasks;
public interface ScheduledTasksApi {
}

View File

@ -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-task</artifactId>
<version>2.0.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>nu-task-api</artifactId>
<packaging>pom</packaging>
<modules>
<module>nu-task-local-api</module>
</modules>
<dependencies>
<dependency>
<groupId>com.nursingunit.boot</groupId>
<artifactId>nursing-unit-base-core</artifactId>
</dependency>
</dependencies>
</project>

View File

@ -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-task</artifactId>
<version>2.0.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>nu-task-biz</artifactId>
<dependencies>
<dependency>
<groupId>com.nursingunit.boot</groupId>
<artifactId>nu-task-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>

View File

@ -0,0 +1,180 @@
package com.nu.modules.scheduledtasks.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.scheduledtasks.entity.ScheduledTasks;
import com.nu.modules.scheduledtasks.service.IScheduledTasksService;
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-06-04
* @Version: V1.0
*/
@Api(tags="定时任务表")
@RestController
@RequestMapping("/scheduledtasks/scheduledTasks")
@Slf4j
public class ScheduledTasksController extends JeecgController<ScheduledTasks, IScheduledTasksService> {
@Autowired
private IScheduledTasksService scheduledTasksService;
/**
* 分页列表查询
*
* @param scheduledTasks
* @param pageNo
* @param pageSize
* @param req
* @return
*/
//@AutoLog(value = "定时任务表-分页列表查询")
@ApiOperation(value="定时任务表-分页列表查询", notes="定时任务表-分页列表查询")
@GetMapping(value = "/list")
public Result<IPage<ScheduledTasks>> queryPageList(ScheduledTasks scheduledTasks,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<ScheduledTasks> queryWrapper = QueryGenerator.initQueryWrapper(scheduledTasks, req.getParameterMap());
Page<ScheduledTasks> page = new Page<ScheduledTasks>(pageNo, pageSize);
IPage<ScheduledTasks> pageList = scheduledTasksService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 添加
*
* @param scheduledTasks
* @return
*/
@AutoLog(value = "定时任务表-添加")
@ApiOperation(value="定时任务表-添加", notes="定时任务表-添加")
@RequiresPermissions("scheduledtasks:nu_scheduled_tasks:add")
@PostMapping(value = "/add")
public Result<String> add(@RequestBody ScheduledTasks scheduledTasks) {
scheduledTasksService.save(scheduledTasks);
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param scheduledTasks
* @return
*/
@AutoLog(value = "定时任务表-编辑")
@ApiOperation(value="定时任务表-编辑", notes="定时任务表-编辑")
@RequiresPermissions("scheduledtasks:nu_scheduled_tasks:edit")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<String> edit(@RequestBody ScheduledTasks scheduledTasks) {
scheduledTasksService.updateById(scheduledTasks);
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*
* @param id
* @return
*/
@AutoLog(value = "定时任务表-通过id删除")
@ApiOperation(value="定时任务表-通过id删除", notes="定时任务表-通过id删除")
@RequiresPermissions("scheduledtasks:nu_scheduled_tasks:delete")
@DeleteMapping(value = "/delete")
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
scheduledTasksService.removeById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
* @param ids
* @return
*/
@AutoLog(value = "定时任务表-批量删除")
@ApiOperation(value="定时任务表-批量删除", notes="定时任务表-批量删除")
@RequiresPermissions("scheduledtasks:nu_scheduled_tasks:deleteBatch")
@DeleteMapping(value = "/deleteBatch")
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
this.scheduledTasksService.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<ScheduledTasks> queryById(@RequestParam(name="id",required=true) String id) {
ScheduledTasks scheduledTasks = scheduledTasksService.getById(id);
if(scheduledTasks==null) {
return Result.error("未找到对应数据");
}
return Result.OK(scheduledTasks);
}
/**
* 导出excel
*
* @param request
* @param scheduledTasks
*/
@RequiresPermissions("scheduledtasks:nu_scheduled_tasks:exportXls")
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, ScheduledTasks scheduledTasks) {
return super.exportXls(request, scheduledTasks, ScheduledTasks.class, "定时任务表");
}
/**
* 通过excel导入数据
*
* @param request
* @param response
* @return
*/
@RequiresPermissions("scheduledtasks:nu_scheduled_tasks:importExcel")
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, ScheduledTasks.class);
}
}

View File

@ -0,0 +1,67 @@
package com.nu.modules.scheduledtasks.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-06-04
* @Version: V1.0
*/
@Data
@TableName("nu_scheduled_tasks")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="nu_scheduled_tasks对象", description="定时任务表")
public class ScheduledTasks implements Serializable {
private static final long serialVersionUID = 1L;
/**主键ID*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "主键ID")
private java.lang.String id;
/**service对应bean名称:方法名*/
@Excel(name = "service对应bean名称:方法名", width = 15)
@ApiModelProperty(value = "service对应bean名称:方法名")
private java.lang.String tag;
/**参数JSON字符串*/
@Excel(name = "参数JSON字符串", width = 15)
@ApiModelProperty(value = "参数JSON字符串")
private java.lang.String params;
/**状态 0待执行 1执行中 3执行成功*/
@Excel(name = "状态 0待执行 1执行中 3执行成功", width = 15)
@ApiModelProperty(value = "状态 0待执行 1执行中 3执行成功")
private java.lang.String status;
/**任务存入时间*/
@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;
/**更新状态时间*/
@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;
/**失败次数*/
@Excel(name = "失败次数", width = 15)
@ApiModelProperty(value = "失败次数")
private java.lang.Integer failureCount;
}

View File

@ -0,0 +1,17 @@
package com.nu.modules.scheduledtasks.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.nu.modules.scheduledtasks.entity.ScheduledTasks;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @Description: 定时任务表
* @Author: 张明远
* @Date: 2025-06-04
* @Version: V1.0
*/
public interface ScheduledTasksMapper extends BaseMapper<ScheduledTasks> {
}

View File

@ -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.scheduledtasks.mapper.ScheduledTasksMapper">
</mapper>

View File

@ -0,0 +1,14 @@
package com.nu.modules.scheduledtasks.service;
import com.nu.modules.scheduledtasks.entity.ScheduledTasks;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* @Description: 定时任务表
* @Author: 张明远
* @Date: 2025-06-04
* @Version: V1.0
*/
public interface IScheduledTasksService extends IService<ScheduledTasks> {
}

View File

@ -0,0 +1,20 @@
package com.nu.modules.scheduledtasks.service.impl;
import com.nu.modules.scheduledtasks.ScheduledTasksApi;
import com.nu.modules.scheduledtasks.entity.ScheduledTasks;
import com.nu.modules.scheduledtasks.mapper.ScheduledTasksMapper;
import com.nu.modules.scheduledtasks.service.IScheduledTasksService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* @Description: 定时任务表
* @Author: 张明远
* @Date: 2025-06-04
* @Version: V1.0
*/
@Service
public class ScheduledTasksServiceImpl extends ServiceImpl<ScheduledTasksMapper, ScheduledTasks> implements IScheduledTasksService, ScheduledTasksApi {
}

20
nursing-unit-task/pom.xml Normal file
View File

@ -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-task</artifactId>
<packaging>pom</packaging>
<modules>
<module>nu-task-api</module>
<module>nu-task-biz</module>
</modules>
</project>

View File

@ -72,6 +72,8 @@
<module>nursing-unit-common</module> <module>nursing-unit-common</module>
<!-- PAYMENT 支付模块 --> <!-- PAYMENT 支付模块 -->
<module>nursing-unit-payment</module> <module>nursing-unit-payment</module>
<!-- TASK 支付模块 -->
<module>nursing-unit-task</module>
<!-- 框架基础包模块 --> <!-- 框架基础包模块 -->
<module>nursing-unit-base-core</module> <module>nursing-unit-base-core</module>
<!-- 框架demo功能模块 --> <!-- 框架demo功能模块 -->