0411
This commit is contained in:
parent
8192ab5f7b
commit
215c9da7fa
@ -1,9 +1,12 @@
|
|||||||
package cn.iocoder.yudao.module.app.company.controller;
|
package cn.iocoder.yudao.module.app.company.controller;
|
||||||
|
|
||||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||||
|
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||||
import cn.iocoder.yudao.framework.tenant.core.aop.TenantIgnore;
|
import cn.iocoder.yudao.framework.tenant.core.aop.TenantIgnore;
|
||||||
|
import cn.iocoder.yudao.framework.tenant.core.db.TenantBaseDO;
|
||||||
import cn.iocoder.yudao.module.company.entity.Company;
|
import cn.iocoder.yudao.module.company.entity.Company;
|
||||||
import cn.iocoder.yudao.module.company.service.CompanyService;
|
import cn.iocoder.yudao.module.company.service.CompanyService;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
@ -16,6 +19,8 @@ import org.springframework.web.bind.annotation.RestController;
|
|||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import javax.annotation.security.PermitAll;
|
import javax.annotation.security.PermitAll;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -68,4 +73,24 @@ public class CompanySmallProgramAPI {
|
|||||||
public CommonResult<?> getCompanyServerNoTenantIdById(@RequestParam("id") String id){
|
public CommonResult<?> getCompanyServerNoTenantIdById(@RequestParam("id") String id){
|
||||||
return success(companyService.getCompanyServerById(id));
|
return success(companyService.getCompanyServerById(id));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查某租户下某个业务系统的企业信息
|
||||||
|
* @author vinjor-M
|
||||||
|
* @date 15:08 2024/11/15
|
||||||
|
* @param tenantId 租户ID
|
||||||
|
* @param systemCode 系统标识
|
||||||
|
* @return cn.iocoder.yudao.framework.common.pojo.CommonResult<?>
|
||||||
|
**/
|
||||||
|
@GetMapping("/getCompanyByTenantId")
|
||||||
|
@Operation(summary = "查某租户下某个业务系统的企业信息")
|
||||||
|
@TenantIgnore
|
||||||
|
public CommonResult<?> getCompanyByTenantId(String tenantId,String systemCode){
|
||||||
|
LambdaQueryWrapper<Company> queryWrapper = new LambdaQueryWrapper<Company>()
|
||||||
|
.eq(TenantBaseDO::getTenantId,tenantId)
|
||||||
|
.like(Company::getServiceCodes,systemCode)
|
||||||
|
.orderByDesc(BaseDO::getCreateTime);
|
||||||
|
List<Company> list = this.companyService.list(queryWrapper);
|
||||||
|
return success(list.isEmpty()?null:list.get(0));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package cn.iocoder.yudao.module.company.entity;
|
package cn.iocoder.yudao.module.company.entity;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.annotation.Excel;
|
||||||
import cn.iocoder.yudao.converter.DateFormatConverter;
|
import cn.iocoder.yudao.converter.DateFormatConverter;
|
||||||
import cn.iocoder.yudao.framework.tenant.core.db.TenantBaseDO;
|
import cn.iocoder.yudao.framework.tenant.core.db.TenantBaseDO;
|
||||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||||
@ -14,8 +15,9 @@ import org.springframework.format.annotation.DateTimeFormat;
|
|||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 企业信息表(每个租户的下属企业信息);
|
* 企业信息表(每个租户的下属企业信息);
|
||||||
|
*
|
||||||
* @author : http://www.chiner.pro
|
* @author : http://www.chiner.pro
|
||||||
* @date : 2024-7-31
|
* @date : 2024-7-31
|
||||||
*/
|
*/
|
||||||
@ -24,53 +26,101 @@ import java.util.Date;
|
|||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
@ExcelIgnoreUnannotated
|
@ExcelIgnoreUnannotated
|
||||||
public class Company extends TenantBaseDO {
|
public class Company extends TenantBaseDO {
|
||||||
/** 主键标识 */
|
/**
|
||||||
|
* 主键标识
|
||||||
|
*/
|
||||||
@TableId(type = IdType.ASSIGN_ID)
|
@TableId(type = IdType.ASSIGN_ID)
|
||||||
private String id ;
|
private String id;
|
||||||
/** 企业名称 */
|
/**
|
||||||
|
* 企业名称
|
||||||
|
*/
|
||||||
@ExcelProperty("企业名称")
|
@ExcelProperty("企业名称")
|
||||||
private String corpName ;
|
private String corpName;
|
||||||
/** 企业简称 */
|
/**
|
||||||
|
* 企业简称
|
||||||
|
*/
|
||||||
@ExcelProperty("企业简称")
|
@ExcelProperty("企业简称")
|
||||||
private String simpleName ;
|
private String simpleName;
|
||||||
/** 统一社会信用代码 */
|
/**
|
||||||
|
* 统一社会信用代码
|
||||||
|
*/
|
||||||
@ExcelProperty("统一社会信用代码")
|
@ExcelProperty("统一社会信用代码")
|
||||||
private String orgCard ;
|
private String orgCard;
|
||||||
/** 注册资本(单位:万元) */
|
/**
|
||||||
|
* 注册资本(单位:万元)
|
||||||
|
*/
|
||||||
@ExcelProperty("注册资本(单位:万元)")
|
@ExcelProperty("注册资本(单位:万元)")
|
||||||
private Integer registFund ;
|
private Integer registFund;
|
||||||
/** 注册日期 */
|
/**
|
||||||
@JsonFormat(pattern="yyyy-MM-dd",timezone="GMT+8")
|
* 注册日期
|
||||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
*/
|
||||||
@ExcelProperty(value = "注册日期",converter = DateFormatConverter.class)
|
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||||
private Date registDate ;
|
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||||
/** 详细地址 */
|
@ExcelProperty(value = "注册日期", converter = DateFormatConverter.class)
|
||||||
|
private Date registDate;
|
||||||
|
/**
|
||||||
|
* 详细地址
|
||||||
|
*/
|
||||||
@ExcelProperty("详细地址")
|
@ExcelProperty("详细地址")
|
||||||
private String address ;
|
private String address;
|
||||||
/** 法人姓名 */
|
/**
|
||||||
|
* 法人姓名
|
||||||
|
*/
|
||||||
@ExcelProperty("法人姓名")
|
@ExcelProperty("法人姓名")
|
||||||
private String legalName ;
|
private String legalName;
|
||||||
/** 法人身份证号 */
|
/**
|
||||||
|
* 法人身份证号
|
||||||
|
*/
|
||||||
@ExcelProperty("法人身份证号")
|
@ExcelProperty("法人身份证号")
|
||||||
private String legalCard ;
|
private String legalCard;
|
||||||
/** 联系人 */
|
/**
|
||||||
|
* 联系人
|
||||||
|
*/
|
||||||
@ExcelProperty("联系人")
|
@ExcelProperty("联系人")
|
||||||
private String contactName ;
|
private String contactName;
|
||||||
/** 联系方式 */
|
/**
|
||||||
|
* 联系方式
|
||||||
|
*/
|
||||||
@ExcelProperty("联系方式")
|
@ExcelProperty("联系方式")
|
||||||
private String mobilePhone ;
|
private String mobilePhone;
|
||||||
/** 企业简介 */
|
/**
|
||||||
|
* 企业简介
|
||||||
|
*/
|
||||||
@ExcelProperty("企业简介")
|
@ExcelProperty("企业简介")
|
||||||
private String corpContent ;
|
private String corpContent;
|
||||||
/** 经营范围 */
|
/**
|
||||||
|
* 经营范围
|
||||||
|
*/
|
||||||
@ExcelProperty("经营范围")
|
@ExcelProperty("经营范围")
|
||||||
private String business ;
|
private String business;
|
||||||
/** 管理员登录账号 */
|
/**
|
||||||
private String loginAccount ;
|
* 管理员登录账号
|
||||||
/** 关联的服务编号(多个以英文逗号隔开)(实际就是这个企业的用户登录后有哪些系统权限) */
|
*/
|
||||||
private String serviceCodes ;
|
private String loginAccount;
|
||||||
/** 开户行 */
|
/**
|
||||||
|
* 关联的服务编号(多个以英文逗号隔开)(实际就是这个企业的用户登录后有哪些系统权限)
|
||||||
|
*/
|
||||||
|
private String serviceCodes;
|
||||||
|
/**
|
||||||
|
* 开户行
|
||||||
|
*/
|
||||||
private String bankAccount;
|
private String bankAccount;
|
||||||
/** 收款账号 */
|
/**
|
||||||
|
* 收款账号
|
||||||
|
*/
|
||||||
private String account;
|
private String account;
|
||||||
}
|
/**
|
||||||
|
* 图片
|
||||||
|
*/
|
||||||
|
private String photo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 营业开始时间
|
||||||
|
*/
|
||||||
|
private String businessStartTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 营业结束时间
|
||||||
|
*/
|
||||||
|
private String businessEndTime;
|
||||||
|
}
|
||||||
|
@ -270,7 +270,9 @@ public class ExamBatchItemServiceImpl extends ServiceImpl<ExamBatchItemMapper, E
|
|||||||
.eq(Process::getCourseId, process.getCourseId())
|
.eq(Process::getCourseId, process.getCourseId())
|
||||||
.eq(Process::getUserId, process.getUserId())
|
.eq(Process::getUserId, process.getUserId())
|
||||||
.eq(Process::getSubject, nextSubject)
|
.eq(Process::getSubject, nextSubject)
|
||||||
.eq(Process::getStatus, "0");
|
.eq(Process::getTenantId,process.getTenantId());
|
||||||
|
System.out.println(process);
|
||||||
|
System.out.println(queryWrapper.getSqlSegment());
|
||||||
List<Process> list = processService.list(queryWrapper);
|
List<Process> list = processService.list(queryWrapper);
|
||||||
if (list.isEmpty()) {
|
if (list.isEmpty()) {
|
||||||
//插入
|
//插入
|
||||||
@ -290,14 +292,17 @@ public class ExamBatchItemServiceImpl extends ServiceImpl<ExamBatchItemMapper, E
|
|||||||
} else {
|
} else {
|
||||||
//更新状态为进行中
|
//更新状态为进行中
|
||||||
Process nextProcess = list.get(0);
|
Process nextProcess = list.get(0);
|
||||||
nextProcess.setStatus("1");
|
if(!"2".equals(nextProcess.getStatus())){
|
||||||
processService.updateById(nextProcess);
|
nextProcess.setStatus("1");
|
||||||
|
processService.updateById(nextProcess);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
//考试不通过
|
//考试不通过
|
||||||
process.setStatus("1");
|
process.setStatus("1");
|
||||||
process.setExamStatus(null);
|
process.setExamStatus("0");
|
||||||
|
process.setExamNum(process.getExamNum() + 1);
|
||||||
processService.updateById(process);
|
processService.updateById(process);
|
||||||
// 发送消息给教练
|
// 发送消息给教练
|
||||||
String message = String.format(SchoolBaseConstants.SCHOOL_NOTIFY_MESSAGE_TEMPLATE_MEMBER_EXAM_SCORE, examBatchVO.getUserName(), subject, examBatchVO.getFraction(), "未通过");
|
String message = String.format(SchoolBaseConstants.SCHOOL_NOTIFY_MESSAGE_TEMPLATE_MEMBER_EXAM_SCORE, examBatchVO.getUserName(), subject, examBatchVO.getFraction(), "未通过");
|
||||||
|
@ -82,4 +82,9 @@ public interface DriveSchoolInfoMapper
|
|||||||
*/
|
*/
|
||||||
DriveSchoolInfoVO findInfoByJxId(Long jxId);
|
DriveSchoolInfoVO findInfoByJxId(Long jxId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据驾校租户id获取详情
|
||||||
|
*/
|
||||||
|
DriveSchoolInfoVO getSchoolDetailsByTenantId(@Param("tenantId") Long tenantId, @Param("schoolName") String schoolName);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -24,6 +24,7 @@ import org.apache.commons.lang3.StringUtils;
|
|||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import javax.annotation.security.PermitAll;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.security.*;
|
import java.security.*;
|
||||||
import java.util.Base64;
|
import java.util.Base64;
|
||||||
@ -218,4 +219,26 @@ public class SmallProgramJxOrderController {
|
|||||||
return resMap;
|
return resMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生成新的订单号
|
||||||
|
*/
|
||||||
|
@GetMapping("/generateOrderNo")
|
||||||
|
@TenantIgnore
|
||||||
|
@PermitAll
|
||||||
|
public String generateOrderNo() {
|
||||||
|
// 格式化当前时间,取前11位 yyMMddHHmmss
|
||||||
|
String timeStr = new java.text.SimpleDateFormat("yyMMddHHmm")
|
||||||
|
.format(new java.util.Date());
|
||||||
|
|
||||||
|
// 补上1位秒数(只取秒的十位)
|
||||||
|
String seconds = new java.text.SimpleDateFormat("ss").format(new java.util.Date());
|
||||||
|
timeStr += seconds.charAt(0);
|
||||||
|
|
||||||
|
// 生成一位随机数
|
||||||
|
int randomDigit = (int) (Math.random() * 10);
|
||||||
|
|
||||||
|
// 拼接前缀+时间+随机数
|
||||||
|
return "jx" + timeStr + randomDigit;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -71,4 +71,9 @@ public interface IDriveSchoolInfoService
|
|||||||
List<PayVo> findSelfSchoolData();
|
List<PayVo> findSelfSchoolData();
|
||||||
|
|
||||||
/*String selectDriveSchoolInfoAppletById(Long id);*/
|
/*String selectDriveSchoolInfoAppletById(Long id);*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 小程序根据租户id获取驾校详细信息
|
||||||
|
*/
|
||||||
|
DriveSchoolInfoVO getSchoolDetailsByTenantId(Long tenantId, String schoolName);
|
||||||
}
|
}
|
||||||
|
@ -18,6 +18,7 @@ import cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO;
|
|||||||
import cn.iocoder.yudao.module.system.dal.mysql.dept.DeptMapper;
|
import cn.iocoder.yudao.module.system.dal.mysql.dept.DeptMapper;
|
||||||
import cn.iocoder.yudao.module.system.dal.mysql.permission.UserRoleMapper;
|
import cn.iocoder.yudao.module.system.dal.mysql.permission.UserRoleMapper;
|
||||||
import cn.iocoder.yudao.module.system.dal.mysql.user.AdminUserMapper;
|
import cn.iocoder.yudao.module.system.dal.mysql.user.AdminUserMapper;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import org.apache.commons.lang3.ObjectUtils;
|
import org.apache.commons.lang3.ObjectUtils;
|
||||||
@ -288,6 +289,11 @@ public class DriveSchoolInfoServiceImpl implements IDriveSchoolInfoService
|
|||||||
return payVoList;
|
return payVoList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DriveSchoolInfoVO getSchoolDetailsByTenantId(Long tenantId,String schoolName) {
|
||||||
|
return driveSchoolInfoMapper.getSchoolDetailsByTenantId(tenantId, schoolName);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 计算两个经纬度之间的距离
|
* 计算两个经纬度之间的距离
|
||||||
|
@ -163,5 +163,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="getSchoolDetailsByTenantId" resultMap="DriveSchoolInfoVOResult">
|
||||||
|
SELECT *
|
||||||
|
FROM drive_school_info
|
||||||
|
WHERE deleted = 0
|
||||||
|
AND tenant_id = #{tenantId}
|
||||||
|
AND school_name = #{schoolName}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
Loading…
Reference in New Issue
Block a user