Commit 9c9cd33e by 刘鑫

Merge branch 'develop' of https://gitlab.dituhui.com/bsh/project/project into develop

2 parents b763b989 1c4b007e
......@@ -8,7 +8,6 @@ import org.springframework.stereotype.Repository;
import java.util.List;
@Repository
@Where(clause = "status = 1")
public interface OrgBranchDao extends JpaRepository<OrgBranchEntity, Integer> {
List<OrgBranchEntity> findAllByClusterId(String clusterId);
......
......@@ -9,7 +9,6 @@ import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
@Repository
@Where(clause = "status = 1")
public interface OrgClusterDao extends JpaRepository <OrgClusterEntity, Integer> {
OrgClusterEntity getByClusterId(String clusterId);
......
......@@ -10,7 +10,6 @@ import org.springframework.stereotype.Repository;
import java.util.List;
@Repository
@Where(clause = "status = 1")
public interface OrgGroupDao extends JpaRepository<OrgGroupEntity, Integer> {
List<OrgGroupEntity> findAllByBranchId(String branchId);
......
......@@ -14,7 +14,6 @@ import java.util.List;
import java.util.Set;
@Repository
@Where(clause = "status = 1")
public interface OrgTeamDao extends JpaRepository<OrgTeamEntity, Integer>, JpaSpecificationExecutor<OrgTeamEntity> {
@Query("select t from OrgTeamEntity t where t.clusterId = :clusterId and t.status=1")
......
......@@ -272,11 +272,10 @@ public class OrderCreateServiceImpl implements OrderCreateService {
OrderInfoEntity entity = new OrderInfoEntity();
String orderId = req.getOrderId();
if (StringUtils.isEmpty(orderId)) {
String s = UUID.randomUUID().toString().replace("-", "");
orderId = s.substring(s.length() - 9);
return Result.failed(StatusCodeEnum.COMMON_PARAM_EMPTY);
}
OrderInfoEntity byOrderId = orderInfoDao.getByOrderId(req.getOrderId());
String peaBrand = fixBrand(req.getBrand());
String peaBrand = CommonUtil.fixBrand(req.getBrand());
if (ObjectUtil.isNotNull(byOrderId)) {
return Result.failed(StatusCodeEnum.ORDER_EXISTS);
}
......@@ -507,11 +506,4 @@ public class OrderCreateServiceImpl implements OrderCreateService {
return String.format("%s_%s", orderId, DateUtils.formatDateTime(LocalDateTime.now(), "MMdd"));
}
private String fixBrand(String brand) {
if (!brand.equals("嘉格纳")) {
return "博世/西门子以及其他品牌";
} else {
return brand;
}
}
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!