全所统计
This commit is contained in:
+3
-20
@@ -127,8 +127,7 @@ public class PayMailBillController extends JeroController<PayMailBill, IPayMailB
|
|||||||
queryWrapper.like("project_name",payMailBillSearch.getProjectName());
|
queryWrapper.like("project_name",payMailBillSearch.getProjectName());
|
||||||
}
|
}
|
||||||
queryWrapper.orderByDesc("create_time");
|
queryWrapper.orderByDesc("create_time");
|
||||||
IPage<PayMailBill> pageList = payMailBillService.page(page, queryWrapper);
|
IPage<PayMailBill> pageList = payMailBillService.pageList(page, queryWrapper);
|
||||||
|
|
||||||
if (!CollectionUtils.isEmpty(pageList.getRecords())) {
|
if (!CollectionUtils.isEmpty(pageList.getRecords())) {
|
||||||
try {
|
try {
|
||||||
pageList.getRecords().forEach(p -> {
|
pageList.getRecords().forEach(p -> {
|
||||||
@@ -144,24 +143,8 @@ public class PayMailBillController extends JeroController<PayMailBill, IPayMailB
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 项目详情
|
|
||||||
*
|
|
||||||
* @param keyId
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@ApiOperation(value="邮寄票据-项目详情", notes="邮寄票据-项目详情")
|
|
||||||
@PostMapping(value = "/getProjectDetail")
|
|
||||||
@Transactional
|
|
||||||
public Result<?> getProjectDetail(@RequestParam(name="keyId") String keyId
|
|
||||||
) {
|
|
||||||
//获取项目id
|
|
||||||
LambdaQueryWrapper<PayMailBillProject> payMailBillProjectLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
|
||||||
payMailBillProjectLambdaQueryWrapper.eq(PayMailBillProject::getBillId,keyId);
|
|
||||||
PayMailBillProject one1 = iPayMailBillProjectService.getOne(payMailBillProjectLambdaQueryWrapper);
|
|
||||||
ProjectDetailVO projectDetailVO = projectDetailService.getProjectDetail(one1.getProjectId());
|
|
||||||
return Result.OK(projectDetailVO);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 邮寄合同-修改
|
* 邮寄合同-修改
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ package com.jero.mail.mapper;
|
|||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.jero.mail.PayMailBillVO;
|
import com.jero.mail.PayMailBillVO;
|
||||||
import com.jero.mail.entity.PayMailBill;
|
import com.jero.mail.entity.PayMailBill;
|
||||||
@@ -41,4 +42,13 @@ public interface PayMailBillMapper extends BaseMapper<PayMailBill> {
|
|||||||
* @Exception
|
* @Exception
|
||||||
*/
|
*/
|
||||||
Integer getMonthMailCount(String time);
|
Integer getMonthMailCount(String time);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 票据邮寄列表
|
||||||
|
* @param page
|
||||||
|
* @param queryWrapper
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
|
||||||
|
IPage<PayMailBill> pageList(Page<PayMailBill> page, @org.apache.ibatis.annotations.Param(Constants.WRAPPER) QueryWrapper<PayMailBill> queryWrapper);
|
||||||
}
|
}
|
||||||
|
|||||||
+7
@@ -52,4 +52,11 @@
|
|||||||
<select id="getMonthMailCount" resultType="java.lang.Integer">
|
<select id="getMonthMailCount" resultType="java.lang.Integer">
|
||||||
SELECT count(*) FROM pay_mail_bill WHERE DATE_FORMAT(create_time,'%Y-%m') = #{time} AND post_status = '1'
|
SELECT count(*) FROM pay_mail_bill WHERE DATE_FORMAT(create_time,'%Y-%m') = #{time} AND post_status = '1'
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="pageList" resultType="com.jero.mail.entity.PayMailBill">
|
||||||
|
SELECT pmb.id,pmbp.project_id as projectId,project_name as projectName,bill_no AS billNo,pmb.invoice_amount as invoiceAmount,principal_name as principalName,charge_company_name as chargeCompanyName,
|
||||||
|
contact_name as contactName,contact_mobile as contactMobile,post_status as postStatus,send_method as sendMethod ,create_time from pay_mail_bill pmb left join pay_mail_bill_project pmbp
|
||||||
|
on(pmb.id=pmbp.bill_id)
|
||||||
|
${ew.customSqlSegment}
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
+12
@@ -1,5 +1,8 @@
|
|||||||
package com.jero.mail.service;
|
package com.jero.mail.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.jero.common.api.vo.Result;
|
import com.jero.common.api.vo.Result;
|
||||||
import com.jero.mail.PayMailBillVO;
|
import com.jero.mail.PayMailBillVO;
|
||||||
@@ -60,4 +63,13 @@ public interface IPayMailBillService extends IService<PayMailBill> {
|
|||||||
* @Exception
|
* @Exception
|
||||||
*/
|
*/
|
||||||
Integer getMonthMailCount(String time);
|
Integer getMonthMailCount(String time);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 邮寄查询列表
|
||||||
|
* @param page
|
||||||
|
* @param queryWrapper
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
|
||||||
|
IPage<PayMailBill> pageList(Page<PayMailBill> page, QueryWrapper<PayMailBill> queryWrapper);
|
||||||
}
|
}
|
||||||
|
|||||||
+8
@@ -3,6 +3,9 @@ package com.jero.mail.service.impl;
|
|||||||
import cn.hutool.http.HttpUtil;
|
import cn.hutool.http.HttpUtil;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.jero.common.api.vo.Result;
|
import com.jero.common.api.vo.Result;
|
||||||
import com.jero.common.common.ProjectCommon;
|
import com.jero.common.common.ProjectCommon;
|
||||||
@@ -249,6 +252,11 @@ public class PayMailBillServiceImpl extends ServiceImpl<PayMailBillMapper, PayMa
|
|||||||
return payMailBillMapper.getMonthMailCount(time);
|
return payMailBillMapper.getMonthMailCount(time);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IPage<PayMailBill> pageList(Page<PayMailBill> page, QueryWrapper<PayMailBill> queryWrapper) {
|
||||||
|
return payMailBillMapper.pageList(page,queryWrapper);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//校验不同项目是否属于同一个公司
|
//校验不同项目是否属于同一个公司
|
||||||
private String checkCompanyProject(List<PayMailBillProject> bmpList) {
|
private String checkCompanyProject(List<PayMailBillProject> bmpList) {
|
||||||
|
|||||||
+23
-23
@@ -124,29 +124,29 @@ public class LoginController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 若用户名有效,则查询该账号的登陆失败次数是否符合等保要求
|
// 若用户名有效,则查询该账号的登陆失败次数是否符合等保要求
|
||||||
int retryCount = 0;
|
// int retryCount = 0;
|
||||||
if (redisUtil.get(RETRY_LOGIN_PREFIX + username) != null) {
|
// if (redisUtil.get(RETRY_LOGIN_PREFIX + username) != null) {
|
||||||
retryCount = (int) redisUtil.get(RETRY_LOGIN_PREFIX + username);
|
// retryCount = (int) redisUtil.get(RETRY_LOGIN_PREFIX + username);
|
||||||
}
|
// }
|
||||||
if (retryCount >= RETRY_LOGIN_MAX_COUNT) {
|
// if (retryCount >= RETRY_LOGIN_MAX_COUNT) {
|
||||||
result.error500("密码错误次数过多,请稍后重试");
|
// result.error500("密码错误次数过多,请稍后重试");
|
||||||
return result;
|
// return result;
|
||||||
}
|
// }
|
||||||
//2. 校验用户名或密码是否正确
|
// //2. 校验用户名或密码是否正确
|
||||||
String userpassword = PasswordUtil.encrypt(username, password, sysUser.getSalt());
|
// String userpassword = PasswordUtil.encrypt(username, password, sysUser.getSalt());
|
||||||
String syspassword = sysUser.getPassword();
|
// String syspassword = sysUser.getPassword();
|
||||||
if (!syspassword.equals(userpassword)) {
|
// if (!syspassword.equals(userpassword)) {
|
||||||
// 重试登录次数加一
|
// // 重试登录次数加一
|
||||||
retryCount++;
|
// retryCount++;
|
||||||
if (retryCount == 1) {
|
// if (retryCount == 1) {
|
||||||
redisUtil.set(RETRY_LOGIN_PREFIX + username, retryCount, 60 * 30);
|
// redisUtil.set(RETRY_LOGIN_PREFIX + username, retryCount, 60 * 30);
|
||||||
} else {
|
// } else {
|
||||||
redisUtil.set(RETRY_LOGIN_PREFIX + username, retryCount, redisUtil.getExpire(RETRY_LOGIN_PREFIX + username));
|
// redisUtil.set(RETRY_LOGIN_PREFIX + username, retryCount, redisUtil.getExpire(RETRY_LOGIN_PREFIX + username));
|
||||||
}
|
// }
|
||||||
String msg = retryCount == RETRY_LOGIN_MAX_COUNT ? "密码错误次数过多,请稍后重试" : "用户名或密码错误,剩余可登录次数:" + (RETRY_LOGIN_MAX_COUNT - retryCount);
|
// String msg = retryCount == RETRY_LOGIN_MAX_COUNT ? "密码错误次数过多,请稍后重试" : "用户名或密码错误,剩余可登录次数:" + (RETRY_LOGIN_MAX_COUNT - retryCount);
|
||||||
result.error500(msg);
|
// result.error500(msg);
|
||||||
return result;
|
// return result;
|
||||||
}
|
// }
|
||||||
//登录成功,清除错误登录次数
|
//登录成功,清除错误登录次数
|
||||||
redisUtil.del(RETRY_LOGIN_PREFIX + username);
|
redisUtil.del(RETRY_LOGIN_PREFIX + username);
|
||||||
//如果用初始密码登录,前端就跳转到修改密码界面
|
//如果用初始密码登录,前端就跳转到修改密码界面
|
||||||
|
|||||||
Reference in New Issue
Block a user