Merge branch 'ww' into test
This commit is contained in:
commit
45cf1afa48
|
|
@ -99,7 +99,7 @@ public class TbConCheckServiceImpl implements TbConCheckService {
|
|||
flow.setConName(consInfo.getConName());
|
||||
flow.setAmount(resources.getLpNum());
|
||||
flow.setBalance(resources.getStockNumber());
|
||||
flow.setOperator(SecurityUtils.getCurrentUsername());
|
||||
flow.setOperator(SecurityUtils.getCurrentUserNickName());
|
||||
flow.setCreateTime(new Timestamp(System.currentTimeMillis()));
|
||||
flow.setRemark(resources.getRemark());
|
||||
tbConsInfoFlowRepository.save(flow);
|
||||
|
|
|
|||
|
|
@ -169,7 +169,7 @@ public class TbConsInfoFlowServiceImpl implements TbConsInfoFlowService {
|
|||
tbConsInfoFlow.setBizName("报损");
|
||||
tbConsInfoFlow.setBizType("-");
|
||||
tbConsInfoFlow.setCreateTime(new Timestamp(System.currentTimeMillis()));
|
||||
tbConsInfoFlow.setOperator(SecurityUtils.getCurrentUsername());
|
||||
tbConsInfoFlow.setOperator(SecurityUtils.getCurrentUserNickName());
|
||||
tbConsInfoFlowRepository.save(tbConsInfoFlow);
|
||||
tbConsInfo.setStockNumber(balance);
|
||||
consInfoRepository.save(tbConsInfo);
|
||||
|
|
|
|||
|
|
@ -1,17 +1,5 @@
|
|||
package cn.ysk.cashier.cons.service.impl;
|
||||
|
||||
import javax.persistence.criteria.CriteriaBuilder;
|
||||
import javax.persistence.criteria.CriteriaQuery;
|
||||
import javax.persistence.criteria.Predicate;
|
||||
import javax.persistence.criteria.Root;
|
||||
import javax.persistence.criteria.Subquery;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import cn.ysk.cashier.pojo.product.TbProduct;
|
||||
import org.springframework.data.domain.*;
|
||||
import org.springframework.data.jpa.domain.Specification;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.bean.copier.CopyOptions;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
|
|
@ -45,14 +33,13 @@ import org.apache.poi.xssf.usermodel.XSSFRow;
|
|||
import org.apache.poi.xssf.usermodel.XSSFSheet;
|
||||
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.PageRequest;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.data.jpa.domain.Specification;
|
||||
import org.springframework.data.domain.Sort;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.persistence.criteria.*;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.math.BigDecimal;
|
||||
|
|
@ -351,8 +338,9 @@ public class TbConsInfoServiceImpl implements TbConsInfoService {
|
|||
flow.setShopId(info.getShopId());
|
||||
flow.setConName(info.getConName());
|
||||
flow.setAmount(conInfos.getStockNumber());
|
||||
flow.setRemark(resources.getRemark());
|
||||
flow.setBalance(info.getStockNumber().subtract(info.getStockConsume()));
|
||||
flow.setOperator(SecurityUtils.getCurrentUsername());
|
||||
flow.setOperator(SecurityUtils.getCurrentUserNickName());
|
||||
flow.setCreateTime(new Timestamp(System.currentTimeMillis()));
|
||||
tbConsInfoFlowRepository.save(flow);
|
||||
}
|
||||
|
|
@ -461,7 +449,7 @@ public class TbConsInfoServiceImpl implements TbConsInfoService {
|
|||
flow.setConName(consInfo.getConName());
|
||||
flow.setAmount(consInfo.getStockNumber());
|
||||
flow.setBalance(consInfo.getStockNumber());
|
||||
flow.setOperator(SecurityUtils.getCurrentUsername());
|
||||
flow.setOperator(SecurityUtils.getCurrentUserNickName());
|
||||
flow.setCreateTime(new Timestamp(System.currentTimeMillis()));
|
||||
tbConsInfoFlowRepository.save(flow);
|
||||
|
||||
|
|
@ -486,7 +474,7 @@ public class TbConsInfoServiceImpl implements TbConsInfoService {
|
|||
flow.setConName(consInfo.getConName());
|
||||
flow.setAmount(consInfo.getStockNumber());
|
||||
flow.setBalance(consInfo.getStockNumber());
|
||||
flow.setOperator(SecurityUtils.getCurrentUsername());
|
||||
flow.setOperator(SecurityUtils.getCurrentUserNickName());
|
||||
flow.setCreateTime(new Timestamp(System.currentTimeMillis()));
|
||||
tbConsInfoFlowRepository.save(flow);
|
||||
}
|
||||
|
|
@ -517,7 +505,7 @@ public class TbConsInfoServiceImpl implements TbConsInfoService {
|
|||
flow.setConName(consInfo.getConName());
|
||||
flow.setAmount(consInfo.getStockNumber());
|
||||
flow.setBalance(consInfo.getStockNumber());
|
||||
flow.setOperator(SecurityUtils.getCurrentUsername());
|
||||
flow.setOperator(SecurityUtils.getCurrentUserNickName());
|
||||
flow.setCreateTime(new Timestamp(System.currentTimeMillis()));
|
||||
tbConsInfoFlowRepository.save(flow);
|
||||
|
||||
|
|
|
|||
|
|
@ -177,7 +177,7 @@ public class TbProductStockDetailServiceImpl implements TbProductStockDetailServ
|
|||
stockDetail.setUnitName(tbShopUnit==null?"":tbShopUnit.getName());
|
||||
stockDetail.setCreatedAt(System.currentTimeMillis());
|
||||
stockDetail.setUpdatedAt(System.currentTimeMillis());
|
||||
stockDetail.setOperator(SecurityUtils.getCurrentUsername());
|
||||
stockDetail.setOperator(SecurityUtils.getCurrentUserNickName());
|
||||
tbProductStockDetailRepository.save(stockDetail);
|
||||
product.setStockNumber(product.getStockNumber()-resources.getStockNumber().intValue());
|
||||
tbProductRepository.save(product);
|
||||
|
|
|
|||
|
|
@ -104,12 +104,15 @@ public class TbPlussShopStaffServiceImpl implements TbPlussShopStaffService {
|
|||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public TbPlussShopStaffDto create(TbPlussShopStaff resources) {
|
||||
if (!PhoneUtil.validator(resources.getPhone())){
|
||||
throw new BadRequestException("手机号格式有误");
|
||||
if (org.apache.commons.lang3.StringUtils.isBlank(resources.getAccount())) {
|
||||
throw new BadRequestException("员工账号为空");
|
||||
}
|
||||
if (userRepository.findByUsername(resources.getShopId()+"@"+resources.getAccount()) != null) {
|
||||
throw new BadRequestException("员工账号已存在");
|
||||
}
|
||||
if (!PhoneUtil.validator(resources.getPhone())){
|
||||
throw new BadRequestException("手机号格式有误");
|
||||
}
|
||||
|
||||
if (pattern.matcher(resources.getCode()).find()) {
|
||||
throw new BadRequestException("员工编号不能包含中文");
|
||||
|
|
|
|||
Loading…
Reference in New Issue