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; ...@@ -8,7 +8,6 @@ import org.springframework.stereotype.Repository;
import java.util.List; import java.util.List;
@Repository @Repository
@Where(clause = "status = 1")
public interface OrgBranchDao extends JpaRepository<OrgBranchEntity, Integer> { public interface OrgBranchDao extends JpaRepository<OrgBranchEntity, Integer> {
List<OrgBranchEntity> findAllByClusterId(String clusterId); List<OrgBranchEntity> findAllByClusterId(String clusterId);
......
...@@ -9,7 +9,6 @@ import org.springframework.data.jpa.repository.JpaRepository; ...@@ -9,7 +9,6 @@ import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
@Repository @Repository
@Where(clause = "status = 1")
public interface OrgClusterDao extends JpaRepository <OrgClusterEntity, Integer> { public interface OrgClusterDao extends JpaRepository <OrgClusterEntity, Integer> {
OrgClusterEntity getByClusterId(String clusterId); OrgClusterEntity getByClusterId(String clusterId);
......
...@@ -10,7 +10,6 @@ import org.springframework.stereotype.Repository; ...@@ -10,7 +10,6 @@ import org.springframework.stereotype.Repository;
import java.util.List; import java.util.List;
@Repository @Repository
@Where(clause = "status = 1")
public interface OrgGroupDao extends JpaRepository<OrgGroupEntity, Integer> { public interface OrgGroupDao extends JpaRepository<OrgGroupEntity, Integer> {
List<OrgGroupEntity> findAllByBranchId(String branchId); List<OrgGroupEntity> findAllByBranchId(String branchId);
......
...@@ -14,7 +14,6 @@ import java.util.List; ...@@ -14,7 +14,6 @@ import java.util.List;
import java.util.Set; import java.util.Set;
@Repository @Repository
@Where(clause = "status = 1")
public interface OrgTeamDao extends JpaRepository<OrgTeamEntity, Integer>, JpaSpecificationExecutor<OrgTeamEntity> { public interface OrgTeamDao extends JpaRepository<OrgTeamEntity, Integer>, JpaSpecificationExecutor<OrgTeamEntity> {
@Query("select t from OrgTeamEntity t where t.clusterId = :clusterId and t.status=1") @Query("select t from OrgTeamEntity t where t.clusterId = :clusterId and t.status=1")
......
...@@ -272,11 +272,10 @@ public class OrderCreateServiceImpl implements OrderCreateService { ...@@ -272,11 +272,10 @@ public class OrderCreateServiceImpl implements OrderCreateService {
OrderInfoEntity entity = new OrderInfoEntity(); OrderInfoEntity entity = new OrderInfoEntity();
String orderId = req.getOrderId(); String orderId = req.getOrderId();
if (StringUtils.isEmpty(orderId)) { if (StringUtils.isEmpty(orderId)) {
String s = UUID.randomUUID().toString().replace("-", ""); return Result.failed(StatusCodeEnum.COMMON_PARAM_EMPTY);
orderId = s.substring(s.length() - 9);
} }
OrderInfoEntity byOrderId = orderInfoDao.getByOrderId(req.getOrderId()); OrderInfoEntity byOrderId = orderInfoDao.getByOrderId(req.getOrderId());
String peaBrand = fixBrand(req.getBrand()); String peaBrand = CommonUtil.fixBrand(req.getBrand());
if (ObjectUtil.isNotNull(byOrderId)) { if (ObjectUtil.isNotNull(byOrderId)) {
return Result.failed(StatusCodeEnum.ORDER_EXISTS); return Result.failed(StatusCodeEnum.ORDER_EXISTS);
} }
...@@ -507,11 +506,4 @@ public class OrderCreateServiceImpl implements OrderCreateService { ...@@ -507,11 +506,4 @@ public class OrderCreateServiceImpl implements OrderCreateService {
return String.format("%s_%s", orderId, DateUtils.formatDateTime(LocalDateTime.now(), "MMdd")); 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!