Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
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
项目统一框架
amos-boot-biz
Commits
cb13aad4
Commit
cb13aad4
authored
Jan 26, 2022
by
kongfm
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新气瓶统计相关接口
parent
c6b43741
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
33 additions
and
39 deletions
+33
-39
ControllerAop.java
.../java/com/yeejoin/amos/api/openapi/aop/ControllerAop.java
+1
-1
CylinderPageController.java
...n/amos/api/openapi/controller/CylinderPageController.java
+0
-35
CylinderDateInfoModel.java
...in/amos/api/openapi/face/model/CylinderDateInfoModel.java
+1
-0
CylinderTableModel.java
...ejoin/amos/api/openapi/face/model/CylinderTableModel.java
+6
-0
CylinderDateInfo.java
...in/amos/api/openapi/face/orm/entity/CylinderDateInfo.java
+6
-1
CylinderDateInfoService.java
...mos/api/openapi/face/service/CylinderDateInfoService.java
+19
-2
No files found.
amos-boot-data/amos-boot-data-openapi/src/main/java/com/yeejoin/amos/api/openapi/aop/ControllerAop.java
View file @
cb13aad4
...
...
@@ -39,7 +39,7 @@ public class ControllerAop {
ServletRequestAttributes
attributes
=
(
ServletRequestAttributes
)
RequestContextHolder
.
getRequestAttributes
();
HttpServletRequest
request
=
attributes
.
getRequest
();
// 不需要添加请求头的接口
String
[]
url
=
new
String
[]{
"/api/user/selectInfo"
,
"/api/user/save/curCompany"
,
"/openapi/bizToken/applyToken"
,
"/openapi/bizToken/getAppId"
,
"/lift/upload"
,
"/lift/status"
,
"/lift/run"
,
"/lift/fault"
,
"/lift/video/preview"
};
String
[]
url
=
new
String
[]{
"/api/user/selectInfo"
,
"/api/user/save/curCompany"
,
"/openapi/bizToken/applyToken"
,
"/openapi/bizToken/getAppId"
,
"/lift/upload"
,
"/lift/status"
,
"/lift/run"
,
"/lift/fault"
,
"/lift/video/preview"
,
"/cylinderPage/serviceProvider"
,
"/cylinderPage/getTableInfo"
,
"/cylinderPage/initCylinderNum"
};
// 获取请求路径
for
(
String
uri
:
url
)
{
if
(
request
.
getRequestURI
().
indexOf
(
uri
)
!=
-
1
)
{
...
...
amos-boot-data/amos-boot-data-openapi/src/main/java/com/yeejoin/amos/api/openapi/controller/CylinderPageController.java
View file @
cb13aad4
...
...
@@ -3,32 +3,8 @@ package com.yeejoin.amos.api.openapi.controller;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.yeejoin.amos.api.common.restful.utils.ResponseHelper
;
import
com.yeejoin.amos.api.common.restful.utils.ResponseModel
;
import
com.yeejoin.amos.api.openapi.face.model.CylinderDateInfoModel
;
import
com.yeejoin.amos.api.openapi.face.model.CylinderFillingCheckModel
;
import
com.yeejoin.amos.api.openapi.face.model.CylinderFillingExamineModel
;
import
com.yeejoin.amos.api.openapi.face.model.CylinderFillingExamineModelList
;
import
com.yeejoin.amos.api.openapi.face.model.CylinderFillingModel
;
import
com.yeejoin.amos.api.openapi.face.model.CylinderFillingModelList
;
import
com.yeejoin.amos.api.openapi.face.model.CylinderFillingRecordModel
;
import
com.yeejoin.amos.api.openapi.face.model.CylinderInfoModel
;
import
com.yeejoin.amos.api.openapi.face.model.CylinderInfoModelList
;
import
com.yeejoin.amos.api.openapi.face.model.CylinderInspectionModel
;
import
com.yeejoin.amos.api.openapi.face.model.CylinderInspectionModelList
;
import
com.yeejoin.amos.api.openapi.face.model.CylinderTableModel
;
import
com.yeejoin.amos.api.openapi.face.model.CylinderTagsModel
;
import
com.yeejoin.amos.api.openapi.face.model.CylinderTagsModelList
;
import
com.yeejoin.amos.api.openapi.face.model.CylinderUnitModel
;
import
com.yeejoin.amos.api.openapi.face.model.CylinderUnitModelList
;
import
com.yeejoin.amos.api.openapi.face.model.CylinderUnitTree
;
import
com.yeejoin.amos.api.openapi.face.orm.entity.CylinderDateInfo
;
import
com.yeejoin.amos.api.openapi.face.orm.entity.CylinderFilling
;
import
com.yeejoin.amos.api.openapi.face.orm.entity.CylinderFillingCheck
;
import
com.yeejoin.amos.api.openapi.face.orm.entity.CylinderFillingExamine
;
import
com.yeejoin.amos.api.openapi.face.orm.entity.CylinderFillingRecord
;
import
com.yeejoin.amos.api.openapi.face.orm.entity.CylinderInfo
;
import
com.yeejoin.amos.api.openapi.face.orm.entity.CylinderInspection
;
import
com.yeejoin.amos.api.openapi.face.orm.entity.CylinderTags
;
import
com.yeejoin.amos.api.openapi.face.orm.entity.CylinderUnit
;
import
com.yeejoin.amos.api.openapi.face.orm.entity.OpenapiBizToken
;
import
com.yeejoin.amos.api.openapi.face.service.CylinderDateInfoService
;
import
com.yeejoin.amos.api.openapi.face.service.CylinderFillingCheckService
;
...
...
@@ -40,33 +16,22 @@ import com.yeejoin.amos.api.openapi.face.service.CylinderInspectionService;
import
com.yeejoin.amos.api.openapi.face.service.CylinderTagsService
;
import
com.yeejoin.amos.api.openapi.face.service.CylinderUnitService
;
import
com.yeejoin.amos.api.openapi.face.service.OpenapiBizTokenService
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
net.sf.json.JSONObject
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.typroject.tyboot.component.event.RestEventTrigger
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.doc.TycloudResource
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
java.text.ParseException
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
@RestController
@TycloudResource
(
module
=
"openapi"
,
value
=
"cylinderPage"
)
...
...
amos-boot-data/amos-boot-data-openapi/src/main/java/com/yeejoin/amos/api/openapi/face/model/CylinderDateInfoModel.java
View file @
cb13aad4
...
...
@@ -25,5 +25,6 @@ public class CylinderDateInfoModel extends AbstractBaseModel{
private
Integer
cylinderFillingCheckInfo
;
private
Integer
cylinderExamineInfo
;
private
Integer
cylinderUnit
;
private
Integer
cylinderTotal
;
}
amos-boot-data/amos-boot-data-openapi/src/main/java/com/yeejoin/amos/api/openapi/face/model/CylinderTableModel.java
View file @
cb13aad4
package
com
.
yeejoin
.
amos
.
api
.
openapi
.
face
.
model
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
lombok.Data
;
/**
...
...
@@ -56,4 +57,9 @@ public class CylinderTableModel {
* 气瓶充装信息审核
*/
private
Integer
cylinderExamineInfo
;
/**
* 总量
*/
private
Integer
cylinderTotal
;
}
amos-boot-data/amos-boot-data-openapi/src/main/java/com/yeejoin/amos/api/openapi/face/orm/entity/CylinderDateInfo.java
View file @
cb13aad4
...
...
@@ -2,9 +2,9 @@ package com.yeejoin.amos.api.openapi.face.orm.entity;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
org.typroject.tyboot.core.rdbms.orm.entity.BaseEntity
;
import
java.util.Date
;
...
...
@@ -78,6 +78,11 @@ public class CylinderDateInfo extends BaseEntity {
*/
@TableField
(
"cylinder_unit"
)
private
Integer
cylinderUnit
;
/**
* 总量
*/
@TableField
(
"cylinder_total"
)
private
Integer
cylinderTotal
;
}
amos-boot-data/amos-boot-data-openapi/src/main/java/com/yeejoin/amos/api/openapi/face/service/CylinderDateInfoService.java
View file @
cb13aad4
...
...
@@ -169,6 +169,7 @@ public class CylinderDateInfoService extends BaseService<CylinderDateInfoModel,
Integer
fllingRecord
=
0
;
Integer
fllingCheck
=
0
;
Integer
examine
=
0
;
Integer
total
=
0
;
// 不传入时间默认全部数据
if
(
StringUtils
.
isBlank
(
startTime
)
&&
StringUtils
.
isBlank
(
endTime
))
{
...
...
@@ -183,6 +184,7 @@ public class CylinderDateInfoService extends BaseService<CylinderDateInfoModel,
fllingRecord
+=
info
.
getCylinderFillingRecordInfo
();
fllingCheck
+=
info
.
getCylinderFillingCheckInfo
();
examine
+=
info
.
getCylinderExamineInfo
();
total
+=
info
.
getCylinderTotal
();
}
}
else
if
(
StringUtils
.
isNotBlank
(
startTime
)
&&
StringUtils
.
isBlank
(
endTime
))
{
...
...
@@ -197,6 +199,7 @@ public class CylinderDateInfoService extends BaseService<CylinderDateInfoModel,
fllingRecord
+=
info
.
getCylinderFillingRecordInfo
();
fllingCheck
+=
info
.
getCylinderFillingCheckInfo
();
examine
+=
info
.
getCylinderExamineInfo
();
total
+=
info
.
getCylinderTotal
();
}
}
else
if
(
StringUtils
.
isBlank
(
startTime
)
&&
StringUtils
.
isNotBlank
(
endTime
))
{
// 获取气瓶基本信息
...
...
@@ -210,6 +213,7 @@ public class CylinderDateInfoService extends BaseService<CylinderDateInfoModel,
fllingRecord
+=
info
.
getCylinderFillingRecordInfo
();
fllingCheck
+=
info
.
getCylinderFillingCheckInfo
();
examine
+=
info
.
getCylinderExamineInfo
();
total
+=
info
.
getCylinderTotal
();
}
}
else
if
(
StringUtils
.
isNotBlank
(
startTime
)
&&
StringUtils
.
isNotBlank
(
endTime
))
{
// 获取气瓶基本信息
...
...
@@ -223,6 +227,7 @@ public class CylinderDateInfoService extends BaseService<CylinderDateInfoModel,
fllingRecord
+=
info
.
getCylinderFillingRecordInfo
();
fllingCheck
+=
info
.
getCylinderFillingCheckInfo
();
examine
+=
info
.
getCylinderExamineInfo
();
total
+=
info
.
getCylinderTotal
();
}
}
...
...
@@ -234,6 +239,7 @@ public class CylinderDateInfoService extends BaseService<CylinderDateInfoModel,
temp
.
setCylinderInspectionInfo
(
inspection
);
temp
.
setCylinderTagInfo
(
tags
);
temp
.
setCylinderInfo
(
cylinder
);
temp
.
setCylinderTotal
(
total
);
result
.
add
(
temp
);
}
});
...
...
@@ -250,7 +256,7 @@ public class CylinderDateInfoService extends BaseService<CylinderDateInfoModel,
Integer
fllingRecord
=
0
;
Integer
fllingCheck
=
0
;
Integer
examine
=
0
;
Integer
total
=
0
;
// 不传入时间默认全部数据
if
(
StringUtils
.
isBlank
(
startTime
)
&&
StringUtils
.
isBlank
(
endTime
))
{
// 获取气瓶基本信息
...
...
@@ -264,7 +270,8 @@ public class CylinderDateInfoService extends BaseService<CylinderDateInfoModel,
fllingRecord
+=
info
.
getCylinderFillingRecordInfo
();
fllingCheck
+=
info
.
getCylinderFillingCheckInfo
();
examine
+=
info
.
getCylinderExamineInfo
();
}
total
+=
info
.
getCylinderTotal
();
}
}
else
if
(
StringUtils
.
isNotBlank
(
startTime
)
&&
StringUtils
.
isBlank
(
endTime
))
{
// 获取气瓶基本信息
...
...
@@ -278,6 +285,7 @@ public class CylinderDateInfoService extends BaseService<CylinderDateInfoModel,
fllingRecord
+=
info
.
getCylinderFillingRecordInfo
();
fllingCheck
+=
info
.
getCylinderFillingCheckInfo
();
examine
+=
info
.
getCylinderExamineInfo
();
total
+=
info
.
getCylinderTotal
();
}
}
else
if
(
StringUtils
.
isBlank
(
startTime
)
&&
StringUtils
.
isNotBlank
(
endTime
))
{
// 获取气瓶基本信息
...
...
@@ -291,6 +299,7 @@ public class CylinderDateInfoService extends BaseService<CylinderDateInfoModel,
fllingRecord
+=
info
.
getCylinderFillingRecordInfo
();
fllingCheck
+=
info
.
getCylinderFillingCheckInfo
();
examine
+=
info
.
getCylinderExamineInfo
();
total
+=
info
.
getCylinderTotal
();
}
}
else
if
(
StringUtils
.
isNotBlank
(
startTime
)
&&
StringUtils
.
isNotBlank
(
endTime
))
{
// 获取气瓶基本信息
...
...
@@ -304,6 +313,7 @@ public class CylinderDateInfoService extends BaseService<CylinderDateInfoModel,
fllingRecord
+=
info
.
getCylinderFillingRecordInfo
();
fllingCheck
+=
info
.
getCylinderFillingCheckInfo
();
examine
+=
info
.
getCylinderExamineInfo
();
total
+=
info
.
getCylinderTotal
();
}
}
...
...
@@ -315,6 +325,7 @@ public class CylinderDateInfoService extends BaseService<CylinderDateInfoModel,
temp
.
setCylinderInspectionInfo
(
inspection
);
temp
.
setCylinderTagInfo
(
tags
);
temp
.
setCylinderInfo
(
cylinder
);
temp
.
setCylinderTotal
(
total
);
result
.
add
(
temp
);
}
return
result
;
...
...
@@ -350,6 +361,7 @@ public class CylinderDateInfoService extends BaseService<CylinderDateInfoModel,
Integer
fillingRecord
=
cylinderFillingRecordService
.
count
(
new
LambdaQueryWrapper
<
CylinderFillingRecord
>().
eq
(
CylinderFillingRecord:
:
getAppId
,
appid
).
between
(
CylinderFillingRecord:
:
getSyncDate
,
d
+
" 00:00:00"
,
d
+
" 23:59:59"
));
Integer
fillingCheck
=
cylinderFillingCheckService
.
count
(
new
LambdaQueryWrapper
<
CylinderFillingCheck
>().
eq
(
CylinderFillingCheck:
:
getAppId
,
appid
).
between
(
CylinderFillingCheck:
:
getSyncDate
,
d
+
" 00:00:00"
,
d
+
" 23:59:59"
));
Integer
examine
=
cylinderFillingExamineService
.
count
(
new
LambdaQueryWrapper
<
CylinderFillingExamine
>().
eq
(
CylinderFillingExamine:
:
getAppId
,
appid
).
between
(
CylinderFillingExamine:
:
getSyncDate
,
d
+
" 00:00:00"
,
d
+
" 23:59:59"
));
Integer
total
=
cylinder
+
cylinderUnit
+
tags
+
inspection
+
filling
+
fillingRecord
+
fillingCheck
+
examine
;
temp
.
setCylinderExamineInfo
(
examine
);
temp
.
setCylinderUnit
(
cylinderUnit
);
temp
.
setCylinderFillingCheckInfo
(
fillingCheck
);
...
...
@@ -358,6 +370,7 @@ public class CylinderDateInfoService extends BaseService<CylinderDateInfoModel,
temp
.
setCylinderTagInfo
(
tags
);
temp
.
setCylinderInfo
(
cylinder
);
temp
.
setCylinderFillingRecordInfo
(
fillingRecord
);
temp
.
setCylinderTotal
(
total
);
this
.
createWithModel
(
temp
);
}
}
...
...
@@ -403,6 +416,7 @@ public class CylinderDateInfoService extends BaseService<CylinderDateInfoModel,
Integer
fillingRecord
=
cylinderFillingRecordService
.
count
(
new
LambdaQueryWrapper
<
CylinderFillingRecord
>().
eq
(
CylinderFillingRecord:
:
getAppId
,
appid
).
between
(
CylinderFillingRecord:
:
getSyncDate
,
todayStr
+
" 00:00:00"
,
todayStr
+
" 23:59:59"
));
Integer
fillingCheck
=
cylinderFillingCheckService
.
count
(
new
LambdaQueryWrapper
<
CylinderFillingCheck
>().
eq
(
CylinderFillingCheck:
:
getAppId
,
appid
).
between
(
CylinderFillingCheck:
:
getSyncDate
,
todayStr
+
" 00:00:00"
,
todayStr
+
" 23:59:59"
));
Integer
examine
=
cylinderFillingExamineService
.
count
(
new
LambdaQueryWrapper
<
CylinderFillingExamine
>().
eq
(
CylinderFillingExamine:
:
getAppId
,
appid
).
between
(
CylinderFillingExamine:
:
getSyncDate
,
todayStr
+
" 00:00:00"
,
todayStr
+
" 23:59:59"
));
Integer
total
=
cylinder
+
cylinderUnit
+
tags
+
inspection
+
filling
+
fillingRecord
+
fillingCheck
+
examine
;
temp
.
setCylinderExamineInfo
(
examine
);
temp
.
setCylinderUnit
(
cylinderUnit
);
temp
.
setCylinderFillingCheckInfo
(
fillingCheck
);
...
...
@@ -411,6 +425,7 @@ public class CylinderDateInfoService extends BaseService<CylinderDateInfoModel,
temp
.
setCylinderTagInfo
(
tags
);
temp
.
setCylinderInfo
(
cylinder
);
temp
.
setCylinderFillingRecordInfo
(
fillingRecord
);
temp
.
setCylinderTotal
(
total
);
this
.
createWithModel
(
temp
);
}
else
{
list
.
forEach
(
info
->
{
...
...
@@ -424,6 +439,7 @@ public class CylinderDateInfoService extends BaseService<CylinderDateInfoModel,
Integer
fillingRecord
=
cylinderFillingRecordService
.
count
(
new
LambdaQueryWrapper
<
CylinderFillingRecord
>().
eq
(
CylinderFillingRecord:
:
getAppId
,
appid
).
between
(
CylinderFillingRecord:
:
getSyncDate
,
todayStr
+
" 00:00:00"
,
todayStr
+
" 23:59:59"
));
Integer
fillingCheck
=
cylinderFillingCheckService
.
count
(
new
LambdaQueryWrapper
<
CylinderFillingCheck
>().
eq
(
CylinderFillingCheck:
:
getAppId
,
appid
).
between
(
CylinderFillingCheck:
:
getSyncDate
,
todayStr
+
" 00:00:00"
,
todayStr
+
" 23:59:59"
));
Integer
examine
=
cylinderFillingExamineService
.
count
(
new
LambdaQueryWrapper
<
CylinderFillingExamine
>().
eq
(
CylinderFillingExamine:
:
getAppId
,
appid
).
between
(
CylinderFillingExamine:
:
getSyncDate
,
todayStr
+
" 00:00:00"
,
todayStr
+
" 23:59:59"
));
Integer
total
=
cylinder
+
cylinderUnit
+
tags
+
inspection
+
filling
+
fillingRecord
+
fillingCheck
+
examine
;
info
.
setCylinderExamineInfo
(
examine
);
info
.
setCylinderUnit
(
cylinderUnit
);
info
.
setCylinderFillingCheckInfo
(
fillingCheck
);
...
...
@@ -432,6 +448,7 @@ public class CylinderDateInfoService extends BaseService<CylinderDateInfoModel,
info
.
setCylinderTagInfo
(
tags
);
info
.
setCylinderInfo
(
cylinder
);
info
.
setCylinderFillingRecordInfo
(
fillingRecord
);
info
.
setCylinderTotal
(
total
);
this
.
updateById
(
info
);
});
}
...
...
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