Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
mes
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ximai
mes
Commits
3d81b9ea
Commit
3d81b9ea
authored
Nov 07, 2024
by
温志超
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
165feb28
8c149b1f
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
20 additions
and
5 deletions
+20
-5
AppConfigController.java
...ava/com/ximai/mes/pro/controller/AppConfigController.java
+4
-2
AppConfig.java
mes/src/main/java/com/ximai/mes/pro/domain/AppConfig.java
+4
-0
IAppConfigService.java
...ain/java/com/ximai/mes/pro/service/IAppConfigService.java
+1
-1
AppConfigServiceImpl.java
.../com/ximai/mes/pro/service/impl/AppConfigServiceImpl.java
+3
-1
ProTaskAssistProcessServiceImpl.java
...ro/service/impl/task/ProTaskAssistProcessServiceImpl.java
+2
-0
AppConfigMapper.xml
mes/src/main/resources/mapper/md/AppConfigMapper.xml
+5
-0
SysLogininfor.java
.../src/main/java/com/ximai/system/domain/SysLogininfor.java
+1
-1
No files found.
mes/src/main/java/com/ximai/mes/pro/controller/AppConfigController.java
View file @
3d81b9ea
...
...
@@ -7,6 +7,7 @@ import com.ximai.common.core.page.TableDataInfo;
import
com.ximai.common.enums.BusinessType
;
import
com.ximai.mes.pro.domain.AppConfig
;
import
com.ximai.mes.pro.service.IAppConfigService
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.web.bind.annotation.*
;
...
...
@@ -50,10 +51,11 @@ public class AppConfigController extends BaseController {
/**
* 获取作业端配置记录详细信息
*/
@ApiOperation
(
"获取作业端最新版本"
)
@PreAuthorize
(
"@ss.hasPermi('md:config:query')"
)
@GetMapping
(
value
=
"/getVersion"
)
public
AjaxResult
getVersion
()
{
return
AjaxResult
.
success
(
appConfigService
.
selectLastVersion
());
public
AjaxResult
getVersion
(
@PathVariable
(
"appName"
)
String
appName
)
{
return
AjaxResult
.
success
(
appConfigService
.
selectLastVersion
(
appName
));
}
/**
...
...
mes/src/main/java/com/ximai/mes/pro/domain/AppConfig.java
View file @
3d81b9ea
...
...
@@ -3,6 +3,7 @@ package com.ximai.mes.pro.domain;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.ximai.common.annotation.Excel
;
import
com.ximai.common.core.domain.BaseEntity
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
/**
...
...
@@ -33,6 +34,9 @@ public class AppConfig extends BaseEntity {
@Excel
(
name
=
"下载地址"
)
private
String
url
;
@ApiModelProperty
(
"app名称"
)
private
String
appName
;
/**
* 是否强制更新
*/
...
...
mes/src/main/java/com/ximai/mes/pro/service/IAppConfigService.java
View file @
3d81b9ea
...
...
@@ -59,6 +59,6 @@ public interface IAppConfigService {
*/
int
deleteAppConfigById
(
Long
id
);
List
<
AppConfig
>
selectLastVersion
();
List
<
AppConfig
>
selectLastVersion
(
String
appName
);
}
mes/src/main/java/com/ximai/mes/pro/service/impl/AppConfigServiceImpl.java
View file @
3d81b9ea
package
com
.
ximai
.
mes
.
pro
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.ximai.common.utils.data.StringUtils
;
import
com.ximai.mes.pro.domain.AppConfig
;
import
com.ximai.mes.pro.mapper.AppConfigMapper
;
import
com.ximai.mes.pro.service.IAppConfigService
;
...
...
@@ -97,9 +98,10 @@ public class AppConfigServiceImpl implements IAppConfigService {
}
@Override
public
List
<
AppConfig
>
selectLastVersion
()
{
public
List
<
AppConfig
>
selectLastVersion
(
String
appName
)
{
QueryWrapper
<
AppConfig
>
appConfigQueryWrapper
=
new
QueryWrapper
<>();
appConfigQueryWrapper
.
eq
(
"last_version"
,
0
);
appConfigQueryWrapper
.
eq
(
StringUtils
.
isNotNull
(
appName
),
"app_name"
,
appName
);
List
<
AppConfig
>
appConfigs
=
appConfigMapper
.
selectListByQw
(
appConfigQueryWrapper
);
return
appConfigs
;
}
...
...
mes/src/main/java/com/ximai/mes/pro/service/impl/task/ProTaskAssistProcessServiceImpl.java
View file @
3d81b9ea
...
...
@@ -40,6 +40,7 @@ import org.springframework.transaction.annotation.Transactional;
import
javax.annotation.Resource
;
import
java.math.BigDecimal
;
import
java.util.Calendar
;
import
java.util.List
;
import
java.util.Objects
;
import
java.util.Optional
;
...
...
@@ -309,6 +310,7 @@ public class ProTaskAssistProcessServiceImpl implements IProTaskAssistProcessSer
if
(
feedback
.
getCloseType
()
==
1
||
taskWorkunit
.
getQuantity
().
compareTo
(
taskWorkunit
.
getQuantityProduced
())
<=
0
)
{
taskWorkunit
.
setStatus
(
TaskWorkunitStatusEnum
.
FINISHED
.
getStatus
());
taskWorkunit
.
setActualEndDate
(
Calendar
.
getInstance
().
getTime
());
proTaskWorkunitService
.
updateProTaskWorkunit
(
taskWorkunit
);
}
...
...
mes/src/main/resources/mapper/md/AppConfigMapper.xml
View file @
3d81b9ea
...
...
@@ -9,6 +9,7 @@
<result
property=
"version"
column=
"version"
/>
<result
property=
"lastVersion"
column=
"last_version"
/>
<result
property=
"url"
column=
"url"
/>
<result
property=
"appName"
column=
"app_name"
/>
<result
property=
"updateState"
column=
"update_state"
/>
<result
property=
"updateDesc"
column=
"update_desc"
/>
<result
property=
"createBy"
column=
"create_by"
/>
...
...
@@ -22,6 +23,7 @@
version,
last_version,
url,
app_name,
update_state,
update_desc,
create_by,
...
...
@@ -53,6 +55,7 @@
<if
test=
"version != null"
>
version,
</if>
<if
test=
"lastVersion != null"
>
last_version,
</if>
<if
test=
"url != null"
>
url,
</if>
<if
test=
"appName != null"
>
app_name,
</if>
<if
test=
"updateState != null"
>
update_state,
</if>
<if
test=
"updateDesc != null"
>
update_desc,
</if>
<if
test=
"createBy != null"
>
create_by,
</if>
...
...
@@ -65,6 +68,7 @@
<if
test=
"version != null"
>
#{version},
</if>
<if
test=
"lastVersion != null"
>
#{lastVersion},
</if>
<if
test=
"url != null"
>
#{url},
</if>
<if
test=
"appName != null"
>
#{appName},
</if>
<if
test=
"updateState != null"
>
#{updateState},
</if>
<if
test=
"updateDesc != null"
>
#{updateDesc},
</if>
<if
test=
"createBy != null"
>
#{createBy},
</if>
...
...
@@ -79,6 +83,7 @@
<trim
prefix=
"SET"
suffixOverrides=
","
>
<if
test=
"version != null"
>
version = #{version},
</if>
<if
test=
"url != null"
>
url = #{url},
</if>
<if
test=
"appName != null"
>
app_name = #{appName},
</if>
<if
test=
"updateState != null"
>
update_state = #{updateState},
</if>
<if
test=
"lastVersion != null"
>
last_version = #{lastVersion},
</if>
<if
test=
"updateDesc != null"
>
update_desc = #{updateDesc},
</if>
...
...
system/src/main/java/com/ximai/system/domain/SysLogininfor.java
View file @
3d81b9ea
...
...
@@ -10,7 +10,7 @@ import com.ximai.common.core.domain.BaseEntity;
* 系统访问记录表 sys_logininfor
*
*/
public
class
SysLogininfor
public
class
SysLogininfor
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment