Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
yangxiujun
/
paidan_demo
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 8b284a35
authored
Nov 15, 2023
by
刘鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(逻辑删除): 逻辑删除字段不存在
1 parent
de965ea2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
2 deletions
project-order/src/main/java/com/dituhui/pea/order/dao/OrderInfoDao.java
project-order/src/test/java/com/dituhui/pea/order/scheduler/CalcEngineerCapacitySchedulerTest.java
project-order/src/main/java/com/dituhui/pea/order/dao/OrderInfoDao.java
View file @
8b284a3
...
...
@@ -74,7 +74,7 @@ public interface OrderInfoDao extends JpaRepository<OrderInfoEntity, Long>, JpaS
* @return 满足条件的工单信息
*/
@Query
(
value
=
"SELECT oi.* FROM skill_info si LEFT JOIN order_info oi ON oi.brand = si.brand AND oi.type = si.type AND oi.skill = si.skill "
+
" WHERE si.skill_group_code = :skillGroupCode AND oi.expect_time_begin >= :dateTime AND oi.is_multiple = 0
AND si.status = 1
"
+
" WHERE si.skill_group_code = :skillGroupCode AND oi.expect_time_begin >= :dateTime AND oi.is_multiple = 0 "
+
" AND (appointment_status = 'INIT' AND order_status != 'CANCELED') AND oi.reason_for_failure IS NULL "
,
nativeQuery
=
true
)
List
<
OrderInfoEntity
>
getSkillGroupOrder
(
String
skillGroupCode
,
LocalDateTime
dateTime
);
}
project-order/src/test/java/com/dituhui/pea/order/scheduler/CalcEngineerCapacitySchedulerTest.java
View file @
8b284a3
package
com
.
dituhui
.
pea
.
order
.
scheduler
;
import
com.dituhui.pea.order.OrderServiceApplication
;
import
com.dituhui.pea.order.service.EngineerCalendarService
;
import
org.junit.jupiter.api.Assertions
;
import
org.junit.jupiter.api.Test
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.test.context.SpringBootTest
;
import
java.time.LocalDate
;
@SpringBootTest
(
classes
=
OrderServiceApplication
.
class
)
class
CalcEngineerCapacitySchedulerTest
{
@Autowired
private
CalcEngineerCapacityScheduler
calcEngineerCapacityScheduler
;
@Autowired
private
CalcOrgCapacityScheduler
calcOrgCapacityScheduler
;
@Autowired
private
EngineerCalendarService
engineerCalendarService
;
@Test
void
calcOneEngineer
()
{
// calcEngineerCapacityScheduler.calcOneEngineer("2023-11-09", "6200044665");
calcEngineerCapacityScheduler
.
calcOneEngineer
(
"2023-11-15"
,
"G20210H1301-jiangbei"
);
// calcOrgCapacityScheduler.calcAllGroupByDays("2023-11-14", "2023-11-17");
}
@Test
void
engineerTimeWindow
()
{
int
[][]
ints
=
engineerCalendarService
.
timeWindows
(
"6200043046"
,
"1716782616477233152"
,
LocalDate
.
now
().
plusDays
(
1
));
Assertions
.
assertEquals
(
480
,
ints
[
0
][
0
]);
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment