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
bf162e3a
Commit
bf162e3a
authored
Apr 03, 2023
by
KeYong
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop_dl' of
http://39.98.45.134:8090/moa/amos-boot-biz
into develop_dl
parents
00fef50b
4acaecd6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
444 additions
and
21 deletions
+444
-21
OrgUserVO.java
...om/yeejoin/amos/boot/module/common/api/dto/OrgUserVO.java
+65
-0
OrgUsrTPDlExcelDto.java
...n/amos/boot/module/common/api/dto/OrgUsrTPDlExcelDto.java
+0
-0
UserVO.java
...a/com/yeejoin/amos/boot/module/common/api/dto/UserVO.java
+56
-0
PrivilegeFeignClient.java
...os/boot/module/common/api/feign/PrivilegeFeignClient.java
+39
-0
ExcelEnums.java
...om/yeejoin/amos/boot/module/jcs/api/enums/ExcelEnums.java
+1
-0
ExcelController.java
.../amos/boot/module/jcs/biz/controller/ExcelController.java
+60
-6
DataSourcesImpl.java
...mos/boot/module/jcs/biz/service/impl/DataSourcesImpl.java
+23
-0
ExcelServiceImpl.java
...os/boot/module/jcs/biz/service/impl/ExcelServiceImpl.java
+0
-0
PointController.java
...join/amos/patrol/business/controller/PointController.java
+1
-1
InputItemMapper.java
...join/amos/patrol/business/dao/mapper/InputItemMapper.java
+2
-0
RoutePointItemMapper.java
...amos/patrol/business/dao/mapper/RoutePointItemMapper.java
+12
-1
PointImportParam.java
.../yeejoin/amos/patrol/business/param/PointImportParam.java
+17
-5
PointServiceImpl.java
...n/amos/patrol/business/service/impl/PointServiceImpl.java
+63
-1
application-dev.properties
...-system-jcs/src/main/resources/application-dev.properties
+11
-6
userData.json
amos-boot-system-jcs/src/main/resources/json/userData.json
+37
-0
dbTemplate_input_item.xml
...ol/src/main/resources/db/mapper/dbTemplate_input_item.xml
+13
-0
routePointItemMapper.xml
...rol/src/main/resources/db/mapper/routePointItemMapper.xml
+44
-1
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/dto/OrgUserVO.java
0 → 100644
View file @
bf162e3a
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
api
.
dto
;
import
com.alibaba.excel.annotation.ExcelIgnore
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.baomidou.mybatisplus.annotation.FieldFill
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.yeejoin.amos.boot.module.common.api.entity.DynamicFormInstance
;
import
com.yeejoin.amos.boot.module.common.api.excel.CommonExplicitConstraint
;
import
com.yeejoin.amos.boot.module.common.api.excel.ExplicitConstraint
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
/**
*
*
* 请求参数类
*
*/
@Data
@ApiModel
(
value
=
"请求参数类"
,
description
=
"人员请求参数类"
)
public
class
OrgUserVO
{
@ApiModelProperty
(
value
=
"关联应用appkey"
)
private
List
<
String
>
appCodes
;
@ApiModelProperty
(
value
=
"平台单位id"
)
private
String
companySeqs
;
@ApiModelProperty
(
value
=
"平台部门id"
)
private
String
deptSeqs
;
@ApiModelProperty
(
value
=
"邮箱"
)
private
String
email
;
@ApiModelProperty
(
value
=
"固话号码"
)
private
String
landlinePhone
;
@ApiModelProperty
(
value
=
"是否启用"
)
private
String
lockStatus
;
@ApiModelProperty
(
value
=
"手机号码"
)
private
String
mobile
;
@ApiModelProperty
(
value
=
"组装参数"
)
private
Map
<
String
,
List
<
String
>>
orgRoleSeqs
;
@ApiModelProperty
(
value
=
"密码"
)
private
String
password
;
@ApiModelProperty
(
value
=
"二次密码"
)
private
String
rePassword
;
@ApiModelProperty
(
value
=
"姓名"
)
private
String
realName
;
@ApiModelProperty
(
value
=
"角色权限"
)
private
List
<
String
>
roleSeqs
;
@ApiModelProperty
(
value
=
"用户名"
)
private
String
userName
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/dto/OrgUsrTPDlExcelDto.java
0 → 100644
View file @
bf162e3a
This diff is collapsed.
Click to expand it.
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/dto/UserVO.java
0 → 100644
View file @
bf162e3a
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
api
.
dto
;
import
com.alibaba.excel.annotation.ExcelIgnore
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.baomidou.mybatisplus.annotation.FieldFill
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.yeejoin.amos.boot.module.common.api.entity.DynamicFormInstance
;
import
com.yeejoin.amos.boot.module.common.api.excel.CommonExplicitConstraint
;
import
com.yeejoin.amos.boot.module.common.api.excel.ExplicitConstraint
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
/**
* 机构/部门/人员表
*
* @author tb
* @date 2021-06-18
*/
@Data
@ApiModel
(
value
=
"UserVO"
,
description
=
"平台信息"
)
public
class
UserVO
{
/*************************平台***********************/
@ExcelIgnore
@ApiModelProperty
(
value
=
"关联应用appkey"
)
private
List
<
String
>
appCodes
;
@ApiModelProperty
(
value
=
"角色权限"
)
private
List
<
String
>
roleSeqs
;
@ApiModelProperty
(
value
=
"平台权限组id"
)
private
String
group
;
@ApiModelProperty
(
value
=
"类型"
)
private
String
type
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/feign/PrivilegeFeignClient.java
0 → 100644
View file @
bf162e3a
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
api
.
feign
;
import
com.yeejoin.amos.boot.biz.common.feign.MultipartSupportConfig
;
import
com.yeejoin.amos.boot.module.common.api.dto.OrgUserVO
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.privilege.model.GroupUserModel
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.util.LinkedHashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
* @description:
* @author: tw
* @createDate: 2023/3/29
*/
@FeignClient
(
name
=
"${privilege.fegin.name:AMOS-API-PRIVILEGE}"
,
path
=
""
,
configuration
=
{
MultipartSupportConfig
.
class
})
public
interface
PrivilegeFeignClient
{
@RequestMapping
(
value
=
"/privilege/v1/agencyuser"
,
method
=
RequestMethod
.
POST
)
ResponseModel
<
Object
>
create
(
@RequestHeader
(
"appKey"
)
String
appKey
,
@RequestHeader
(
"product"
)
String
product
,
@RequestHeader
(
"token"
)
String
token
,
@RequestBody
OrgUserVO
var1
);
@RequestMapping
(
value
=
"/privilege/v1/groupUser"
,
method
=
RequestMethod
.
POST
)
ResponseModel
<
Object
>
groupUser
(
@RequestHeader
(
"appKey"
)
String
appKey
,
@RequestHeader
(
"product"
)
String
product
,
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
"groupSeq"
)
Long
groupSeq
,
@RequestBody
List
<
String
>
var2
);
}
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/enums/ExcelEnums.java
View file @
bf162e3a
...
...
@@ -21,6 +21,7 @@ public enum ExcelEnums {
CLZQ
(
"车辆执勤"
,
"车辆执勤"
,
"com.yeejoin.amos.boot.module.common.api.dto.DutyCarExcelDto"
,
"CLZQ"
),
//("CLZQ","车辆执勤")
JCDWRY
(
"单位人员"
,
"单位人员"
,
"com.yeejoin.amos.boot.module.common.api.dto.OrgUsrExcelDto"
,
"JCDWRY"
),
//("JCDW","机场单位")
DLDWRY
(
"单位人员"
,
"单位人员"
,
"com.yeejoin.amos.boot.module.common.api.dto.OrgUsrDlExcelDto"
,
"DLDWRY"
),
//("JCDW","机场单位")
JCDWRYTP
(
"单位人员同步平台"
,
"单位人员同步平台"
,
"com.yeejoin.amos.boot.module.common.api.dto.OrgUsrTPDlExcelDto"
,
"JCDWRYTP"
),
//("JCDW","机场单位")
LDDW
(
"联动单位"
,
"联动单位"
,
"com.yeejoin.amos.boot.module.common.api.dto.LinkageUnitDto"
,
"LDDW"
),
//("JCDW","机场单位")
RYZB
(
"人员值班"
,
"人员值班"
,
"com.yeejoin.amos.boot.module.common.api.dto.DutyPersonDto"
,
"RYZB"
),
//("RYZB","人员值班")
// BUG 2455 相关代码 bykongfm
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/ExcelController.java
View file @
bf162e3a
...
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.jcs.biz.controller;
import
java.util.Map
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
com.yeejoin.amos.boot.module.common.api.enums.ExceptionEnum
;
...
...
@@ -58,11 +59,15 @@ public class ExcelController extends BaseController {
@Autowired
Sequence
sequence
;
@Value
(
"${logic}"
)
Boolean
logic
;
@Value
(
"${logic}"
)
private
Boolean
logic
;
private
static
String
JCDWRY
=
"JCDWRY"
;
private
static
String
DLDWRY
=
"DLDWRY"
;
//同步机场单位
private
static
String
JCDWRYTP
=
"JCDWRYTP"
;
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"获取上传excle文件是否成功"
)
...
...
@@ -108,7 +113,7 @@ public class ExcelController extends BaseController {
@ApiOperation
(
value
=
"导出公用类"
)
@GetMapping
(
"/export/{type}"
)
public
void
getFireStationFile
(
HttpServletResponse
response
,
@PathVariable
(
value
=
"type"
)
String
type
,
@RequestParam
Map
par
)
{
@RequestParam
Map
<
String
,
Object
>
par
)
{
try
{
if
(
type
.
equals
(
JCDWRY
)
&&
logic
!=
null
&&!
logic
){
type
=
DLDWRY
;
...
...
@@ -127,7 +132,7 @@ public class ExcelController extends BaseController {
@ApiOperation
(
value
=
"导入公用"
)
@PostMapping
(
"/upload/{type}"
)
public
ResponseModel
<
Object
>
upload
(
@RequestPart
(
"file"
)
MultipartFile
multipartFile
,
@PathVariable
(
value
=
"type"
)
String
type
)
{
@PathVariable
(
value
=
"type"
)
String
type
,
HttpServletRequest
equest
)
{
try
{
long
uuid
=
sequence
.
nextId
();
String
uuidString
=
Long
.
toString
(
uuid
);
...
...
@@ -138,7 +143,7 @@ public class ExcelController extends BaseController {
ExcelEnums
excelEnums
=
ExcelEnums
.
getByKey
(
type
);
ExcelDto
excelDto
=
new
ExcelDto
(
excelEnums
.
getFileName
(),
excelEnums
.
getSheetName
(),
excelEnums
.
getClassUrl
(),
excelEnums
.
getType
());
excelService
.
commonUpload
(
multipartFile
,
excelDto
,
uuidString
);
excelService
.
commonUpload
(
multipartFile
,
excelDto
,
uuidString
,
equest
);
return
ResponseHelper
.
buildResponse
(
uuidString
);
}
catch
(
RuntimeException
e
)
{
e
.
printStackTrace
();
...
...
@@ -214,4 +219,53 @@ public class ExcelController extends BaseController {
throw
new
BadRequest
(
ExceptionEnum
.
PARAMETER_TYPE_ERR
.
getEmsg
());
}
}
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"获取导入接口"
)
@GetMapping
(
value
=
"/getexport/{key}"
)
public
ResponseModel
<
Object
>
getexport
(
@PathVariable
(
value
=
"key"
)
String
key
)
{
Object
ob
=
redisUtils
.
get
(
key
);
return
ResponseHelper
.
buildResponse
(
ob
);
}
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"导入公用"
)
@PostMapping
(
"/uploadNew"
)
public
ResponseModel
<
Object
>
uploadNew
(
@RequestPart
(
"file"
)
MultipartFile
multipartFile
,
HttpServletRequest
equest
)
{
try
{
ExcelEnums
excelEnums
=
ExcelEnums
.
getByKey
(
JCDWRYTP
);
ExcelDto
excelDto
=
new
ExcelDto
(
excelEnums
.
getFileName
(),
excelEnums
.
getSheetName
(),
excelEnums
.
getClassUrl
(),
excelEnums
.
getType
());
Object
ob
=
excelService
.
commonUpload
(
multipartFile
,
excelDto
,
null
,
equest
);
return
ResponseHelper
.
buildResponse
(
ob
);
}
catch
(
RuntimeException
e
)
{
e
.
printStackTrace
();
throw
new
BadRequest
(
e
.
getMessage
());
}
catch
(
Exception
e
)
{
throw
new
BadRequest
(
"文件格式不正确或excel 模板不匹配!"
);
}
}
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"下载模板"
)
@GetMapping
(
"/downloadnew/template"
)
public
void
downloadnew
(
HttpServletResponse
response
)
{
try
{
ExcelEnums
excelEnums
=
ExcelEnums
.
getByKey
(
JCDWRYTP
);
ExcelDto
excelDto
=
new
ExcelDto
(
excelEnums
.
getFileName
(),
excelEnums
.
getSheetName
(),
excelEnums
.
getClassUrl
(),
excelEnums
.
getType
());
excelService
.
templateExport
(
response
,
excelDto
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
throw
new
BadRequest
(
ExceptionEnum
.
PARAMETER_TYPE_ERR
.
getEmsg
());
}
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/DataSourcesImpl.java
View file @
bf162e3a
...
...
@@ -32,6 +32,8 @@ import com.yeejoin.amos.boot.module.common.biz.service.impl.FireTeamServiceImpl;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.FirefightersServiceImpl
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.OrgUsrServiceImpl
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.model.DepartmentModel
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
com.yeejoin.amos.feign.systemctl.model.RegionModel
;
import
net.sf.cglib.beans.BeanMap
;
...
...
@@ -206,12 +208,33 @@ public class DataSourcesImpl implements DataSources {
case
"getListByEquipmentCode"
:
str
=
getListByEquipmentCode
();
break
;
case
"getdeptSeqsList"
:
str
=
getdeptSeqsList
();
break
;
}
}
return
str
;
}
private
String
[]
getdeptSeqsList
()
{
ReginParams
reginParams
=
JSON
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
Long
sequenceNbr
=
reginParams
.
getCompany
().
getSequenceNbr
();
FeignClientResult
<
Collection
<
DepartmentModel
>>
date
=
Privilege
.
departmentClient
.
queryDeptTree
(
null
,
sequenceNbr
);
Collection
<
DepartmentModel
>
depts
=
date
.
getResult
();
List
<
String
>
carNameList
=
Lists
.
newArrayList
();
depts
.
forEach
(
dept
->
{
carNameList
.
add
(
dept
.
getDepartmentName
()
+
"@"
+
dept
.
getSequenceNbr
());
});
String
[]
str
=
carNameList
.
toArray
(
new
String
[
carNameList
.
size
()]);
return
str
;
}
private
String
[]
getCarList
()
{
ResponseModel
<
Object
>
response
=
equipFeignClient
.
getFireCarListAll
();
List
<
Map
<
String
,
Object
>>
carList
=
(
List
<
Map
<
String
,
Object
>>)
response
.
getResult
();
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/ExcelServiceImpl.java
View file @
bf162e3a
This diff is collapsed.
Click to expand it.
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/controller/PointController.java
View file @
bf162e3a
...
...
@@ -864,7 +864,7 @@ public class PointController extends AbstractBaseController {
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
loginOrgCode
=
getOrgCode
(
reginParams
);
String
fileName
=
"巡检点导入模板.xls"
;
//模板名称
String
[]
handers
=
{
"点编号"
,
"点名称"
,
"是否为移动点"
,
"计划外巡检是否评分"
,
"是否允许离线巡检"
,
"参考地址"
,
"最少拍照数量"
,
"最多拍照数量"
,
"风险等级"
,
"备注说明"
,
"
检查项目"
,
"是否室内"
,
"归属单位/部门"
,
"责任人"
,
"所在建筑
"
};
//列标题
String
[]
handers
=
{
"点编号"
,
"点名称"
,
"是否为移动点"
,
"计划外巡检是否评分"
,
"是否允许离线巡检"
,
"参考地址"
,
"最少拍照数量"
,
"最多拍照数量"
,
"风险等级"
,
"备注说明"
,
"
是否室内"
,
"归属单位/部门"
,
"责任人"
,
"所在建筑"
,
"装备对象|检查项编号
"
};
//列标题
List
<
String
[]>
downData
=
new
ArrayList
();
String
[]
isScore
=
{
"否"
,
"是"
};
String
[]
isFixed
=
{
"否"
,
"是"
};
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/dao/mapper/InputItemMapper.java
View file @
bf162e3a
...
...
@@ -57,6 +57,8 @@ public interface InputItemMapper extends BaseMapper<InputItem> {
public
List
<
PointInputItemVo
>
queryCustomInputItem
(
HashMap
<
String
,
Object
>
param
);
List
<
PointInputItemVo
>
queryCustomInputItemByCodes
(
@Param
(
"inputItemNos"
)
List
<
String
>
inputItemNos
);
public
List
<
InputItemVo
>
getInputItemListByitemNos
(
@Param
(
"itemNos"
)
String
[]
itemNos
);
public
List
<
PointInputItemVo
>
queryCustomInputItemByPointId
(
@Param
(
"classifyId"
)
String
classifyId
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/dao/mapper/RoutePointItemMapper.java
View file @
bf162e3a
package
com
.
yeejoin
.
amos
.
patrol
.
business
.
dao
.
mapper
;
import
com.yeejoin.amos.patrol.dao.entity.RoutePointItem
;
import
com.yeejoin.amos.patrol.dao.entity.RoutePointItem
;
import
java.util.HashMap
;
import
java.util.List
;
public
interface
RoutePointItemMapper
extends
BaseMapper
{
...
...
@@ -11,4 +14,12 @@ public interface RoutePointItemMapper extends BaseMapper {
int
delRoutePointItemByPointId
(
Long
pointId
);
public
void
insertRoutePointItem
(
RoutePointItem
pointItem
);
/**
* 根据装备编码查装备信息
* @param equipCode 装备code
* @return
*/
HashMap
<
String
,
String
>
getEquipByCode
(
String
equipCode
);
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/param/PointImportParam.java
View file @
bf162e3a
...
...
@@ -179,20 +179,21 @@ public class PointImportParam {
/**
* 负责人id
*/
@Excel
(
name
=
"责任人"
,
orderNum
=
"1
3
"
)
@Excel
(
name
=
"责任人"
,
orderNum
=
"1
2
"
)
private
String
chargePersonId
;
@Excel
(
name
=
"检查项目"
,
orderNum
=
"10"
)
// @Excel(name = "检查项目", orderNum = "10")
@ExcelIgnore
private
String
inputItems
;
@Excel
(
name
=
"是否室内"
,
replace
={
"是_1"
,
"否_0"
},
orderNum
=
"1
1
"
)
@Excel
(
name
=
"是否室内"
,
replace
={
"是_1"
,
"否_0"
},
orderNum
=
"1
0
"
)
private
String
isIndoor
=
"0"
;
/**
* 归属区域/部门id
*/
@Excel
(
name
=
"归属单位/部门"
,
orderNum
=
"1
2
"
)
@Excel
(
name
=
"归属单位/部门"
,
orderNum
=
"1
1
"
)
private
String
chargeDeptId
;
...
...
@@ -205,7 +206,7 @@ public class PointImportParam {
/**
* 物理区域id(数据来源于装备wl_area)
*/
@Excel
(
name
=
"所在建筑"
,
orderNum
=
"1
4
"
)
@Excel
(
name
=
"所在建筑"
,
orderNum
=
"1
3
"
)
private
String
areaId
;
/**
* 物理区域名称(数据来源于装备wl_area)
...
...
@@ -213,6 +214,17 @@ public class PointImportParam {
@ExcelIgnore
private
String
areaName
;
@Excel
(
name
=
"装备对象|检查项编号"
,
orderNum
=
"14"
)
private
String
equipInputInfo
;
public
String
getEquipInputInfo
()
{
return
equipInputInfo
;
}
public
void
setEquipInputInfo
(
String
equipInputInfo
)
{
this
.
equipInputInfo
=
equipInputInfo
;
}
public
String
getChargeDeptId
()
{
return
chargeDeptId
;
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/service/impl/PointServiceImpl.java
View file @
bf162e3a
...
...
@@ -11,6 +11,7 @@ import com.yeejoin.amos.patrol.business.constants.XJConstant;
import
com.yeejoin.amos.patrol.business.dao.mapper.InputItemMapper
;
import
com.yeejoin.amos.patrol.business.dao.mapper.PointMapper
;
import
com.yeejoin.amos.patrol.business.dao.mapper.RouteMapper
;
import
com.yeejoin.amos.patrol.business.dao.mapper.RoutePointItemMapper
;
import
com.yeejoin.amos.patrol.business.dao.repository.*
;
import
com.yeejoin.amos.patrol.business.dto.PointClassifySynDto
;
import
com.yeejoin.amos.patrol.business.entity.mybatis.CheckPtListBo
;
...
...
@@ -19,6 +20,7 @@ import com.yeejoin.amos.patrol.business.feign.JcsFeignClient;
import
com.yeejoin.amos.patrol.business.param.*
;
import
com.yeejoin.amos.patrol.business.service.intfc.IPatrolDataSyncService
;
import
com.yeejoin.amos.patrol.business.service.intfc.IPointService
;
import
com.yeejoin.amos.patrol.business.util.CommonResponseUtil
;
import
com.yeejoin.amos.patrol.business.util.DaoCriteria
;
import
com.yeejoin.amos.patrol.business.vo.*
;
import
com.yeejoin.amos.patrol.common.enums.PointStatusEnum
;
...
...
@@ -45,6 +47,7 @@ import org.springframework.transaction.support.TransactionSynchronization;
import
org.springframework.transaction.support.TransactionSynchronizationManager
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
javax.annotation.Resource
;
...
...
@@ -92,7 +95,8 @@ public class PointServiceImpl implements IPointService {
private
ICatalogTreeDao
catalogTreeDao
;
@Autowired
private
InputItemMapper
inputItemMapper
;
@Autowired
private
RoutePointItemMapper
routePointItemMapper
;
@Resource
IPlanTaskDao
planTaskDao
;
@Autowired
...
...
@@ -260,6 +264,64 @@ public class PointServiceImpl implements IPointService {
}
iPointDao
.
saveAndFlush
(
point
);
ids
.
add
(
point
.
getId
());
if
(
StringUtil
.
isNotEmpty
(
param
.
getEquipInputInfo
()))
{
String
[]
infos
=
param
.
getEquipInputInfo
().
split
(
"\\|"
);
for
(
int
i
=
0
;
i
<
infos
.
length
;
i
++)
{
String
[]
split
=
infos
[
i
].
split
(
":"
);
String
equipCode
=
split
[
0
];
List
<
String
>
inputItemCodes
=
Arrays
.
asList
(
split
[
1
].
split
(
","
));
List
<
RoutePoint
>
routePointList
=
iRoutePointDao
.
queryByPointId
(
point
.
getId
());
HashMap
<
String
,
String
>
equipByCode
=
routePointItemMapper
.
getEquipByCode
(
equipCode
);
if
(
ObjectUtils
.
isEmpty
(
equipByCode
))
{
throw
new
BadRequest
(
"装备编码不存在"
);
}
PointClassify
newPointClassify
=
new
PointClassify
();
newPointClassify
.
setEquipmentId
(
equipByCode
.
get
(
"equipmentId"
));
newPointClassify
.
setName
(
equipByCode
.
get
(
"name"
));
// newPointClassify.setInspectionSpecName();
newPointClassify
.
setCreatorId
(
userId
);
newPointClassify
.
setPointId
(
point
.
getId
());
newPointClassify
.
setOrderNo
(
0
);
newPointClassify
.
setDataSourceCode
(
"1"
);
newPointClassify
.
setDataSourceName
(
"消防装备"
);
newPointClassify
.
setAddress
(
equipByCode
.
get
(
"address"
));
newPointClassify
.
setBuildingId
(
String
.
valueOf
(
equipByCode
.
get
(
"sourceId"
)));
String
uuid
=
UUID
.
randomUUID
().
toString
().
replace
(
"-"
,
""
);
newPointClassify
.
setOriginalId
(
uuid
.
substring
(
0
,
16
));
newPointClassify
.
setCategoryCode
(
equipByCode
.
get
(
"categoryCode"
));
newPointClassify
.
setCategoryName
(
equipByCode
.
get
(
"categoryName"
));
newPointClassify
.
setCode
(
equipByCode
.
get
(
"code"
));
newPointClassify
.
setBuildingName
(
equipByCode
.
get
(
"fullName"
));
List
<
PointClassify
>
pointClassifies
=
iPointClassifyDao
.
queryByPointIdAndEquipmentId
(
point
.
getId
(),
equipByCode
.
get
(
"equipmentId"
));
if
(!
CollectionUtils
.
isEmpty
(
pointClassifies
))
{
newPointClassify
.
setId
(
pointClassifies
.
get
(
0
).
getId
());
}
this
.
addPointClassifyByPointId
(
newPointClassify
);
List
<
PointInputItemVo
>
customInputList
=
inputItemMapper
.
queryCustomInputItemByCodes
(
inputItemCodes
);
for
(
PointInputItemVo
pItemVo
:
customInputList
)
{
PointInputItem
pointInputItem
=
new
PointInputItem
();
pointInputItem
.
setPointId
(
newPointClassify
.
getPointId
());
pointInputItem
.
setInputItemId
(
pItemVo
.
getId
());
pointInputItem
.
setClassifyIds
(
Long
.
valueOf
(
newPointClassify
.
getId
()).
toString
());
pointInputItem
.
setId
(
0
);
pointInputItem
.
setOrderNo
(
pItemVo
.
getpOrderNo
());
PointInputItem
pointInputItemResult
=
iPointInputItemDao
.
save
(
pointInputItem
);
//更新巡检路线
if
(
routePointList
.
size
()
>
0
)
{
Long
classifyId
=
newPointClassify
.
getId
();
for
(
RoutePoint
routePoint
:
routePointList
)
{
RoutePointItem
routePointItem
=
new
RoutePointItem
();
routePointItem
.
setPointClassifyId
(
classifyId
);
routePointItem
.
setPointInputItemId
(
pointInputItemResult
.
getId
());
routePointItem
.
setRoutePointId
(
routePoint
.
getId
());
iRoutePointItemDao
.
save
(
routePointItem
);
}
}
}
}
}
String
inputItems
=
param
.
getInputItems
();
if
(!
ObjectUtils
.
isEmpty
(
inputItems
))
{
String
[]
itemNos
=
inputItems
.
replaceAll
(
" "
,
""
).
split
(
","
);
...
...
amos-boot-system-jcs/src/main/resources/application-dev.properties
View file @
bf162e3a
## DB properties:
spring.datasource.url
=
jdbc:mysql://172.16.1
0.215
:3306/dl_amos_common_biz?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8
spring.datasource.url
=
jdbc:mysql://172.16.1
1.201
:3306/dl_amos_common_biz?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8
spring.datasource.username
=
root
spring.datasource.password
=
Yeejoin@2020
## eureka properties:
eureka.client.serviceUrl.defaultZone
=
http://${spring.security.user.name}:${spring.security.user.password}@172.16.1
0.215
:10001/eureka/
eureka.client.serviceUrl.defaultZone
=
http://${spring.security.user.name}:${spring.security.user.password}@172.16.1
1.201
:10001/eureka/
spring.security.user.name
=
admin
spring.security.user.password
=
a1234560
## redis properties:danger/list
spring.redis.database
=
1
spring.redis.host
=
172.16.1
0.215
spring.redis.host
=
172.16.1
1.201
spring.redis.port
=
6379
spring.redis.password
=
yeejoin@2020
## ES properties:
biz.elasticsearch.address
=
172.16.1
0.215
biz.elasticsearch.address
=
172.16.1
1.201
spring.data.elasticsearch.cluster-name
=
elasticsearch
spring.data.elasticsearch.cluster-nodes
=
${biz.elasticsearch.address}:9300
spring.elasticsearch.rest.uris
=
http://${biz.elasticsearch.address}:9200
...
...
@@ -28,7 +28,7 @@ elasticsearch.password= Yeejoin@2020
## emqx properties:
emqx.clean-session
=
true
emqx.client-id
=
${spring.application.name}-${random.int[1024,65536]}
emqx.broker
=
tcp://172.16.1
0.215
:1883
emqx.broker
=
tcp://172.16.1
1.201
:1883
emqx.user-name
=
admin
emqx.password
=
public
...
...
@@ -42,9 +42,13 @@ rule.definition.default-agency=jcs
#spring.data.mongodb.uri=mongodb://172.16.6.60:27017/command_db
## file properties:
file.url
=
http://
39.98.45.134
:9000/
file.url
=
http://
172.16.11.201
:9000/
video.url
=
https://11.11.16.4:443/
ifc.url
=
http://11.11.16.17/IFCInterface
ifc.call-back.localIp
=
11.11.16.1
#ƽ̨Ӧ
privilege.fegin.name
=
AMOS-API-PRIVILEGE
feign.client.config.default.connect-timeout
=
20000
feign.client.config.default.read-timeout
=
20000
\ No newline at end of file
amos-boot-system-jcs/src/main/resources/json/userData.json
0 → 100644
View file @
bf162e3a
[
{
"type"
:
"管理员"
,
"group"
:
"1476527581793099777"
,
"roleSeqs"
:
[
"1242292537276882946"
,
"1262313307763683330"
,
"1262313395743404033"
,
"1232939411144667138"
],
"appCodes"
:
[
"studio_normalapp_3056965"
,
"studio_normalapp_3532826"
,
"studio_normalapp_3143547"
,
"AMOS_STUDIO"
,
"AMOS_ADMIN"
]
},
{
"type"
:
"非管理员"
,
"group"
:
"1476527581793099777"
,
"roleSeqs"
:
[
"1242292537276882946"
,
"1262313307763683330"
,
"1262313395743404033"
,
"1232939411144667138"
],
"appCodes"
:
[
"studio_normalapp_3056965"
,
"studio_normalapp_3532826"
,
"studio_normalapp_3143547"
,
"AMOS_STUDIO"
,
"AMOS_ADMIN"
]
}
]
\ No newline at end of file
amos-boot-system-patrol/src/main/resources/db/mapper/dbTemplate_input_item.xml
View file @
bf162e3a
...
...
@@ -461,4 +461,16 @@
</foreach>
</delete>
<select
id=
"queryCustomInputItemByCodes"
resultType=
"com.yeejoin.amos.patrol.business.vo.PointInputItemVo"
>
SELECT * FROM p_input_item
<where>
is_delete = '0'
<if
test=
"inputItemNos != null and inputItemNos.size() > 0"
>
AND item_no IN
<foreach
collection=
"inputItemNos"
item=
"item"
index=
"index"
separator=
","
open=
"("
close=
")"
>
#{item}
</foreach>
</if>
</where>
</select>
</mapper>
\ No newline at end of file
amos-boot-system-patrol/src/main/resources/db/mapper/routePointItemMapper.xml
View file @
bf162e3a
...
...
@@ -75,7 +75,50 @@
</insert>
<select
id=
"getEquipByCode"
resultType=
"java.util.HashMap"
>
SELECT
Cast( spec.id as char) as equipmentId,
spec.name AS name,
structure.source_id AS sourceId,
structure.source_code AS sourceCode,
spec.system_id AS systemId,
spec.code AS code,
spec.id AS id,
category.NAME AS categoryName,
category.CODE AS categoryCode,
equipment_detail.area AS address,
equipment_detail.equipment_name as eqpDefName,
equipment_detail.equipment_id as eqpDefId,
spec.biz_org_name as bizOrgName,
spec.position AS acre,
we.inspection_spec as inspectionSpecId,
0 as orderNo,
structure.full_name as fullName
FROM
wl_equipment_specific spec
LEFT JOIN wl_equipment_detail equipment_detail ON equipment_detail.id = spec.equipment_detail_id
LEFT JOIN (
SELECT
DISTINCT equipment_specific_id
, warehouse_structure_id
FROM
wl_stock_detail
) AS detail ON detail.equipment_specific_id = spec.id
LEFT JOIN wl_warehouse_structure structure ON spec.warehouse_structure_id = structure.id
LEFT JOIN (
SELECT
s.id,
s.name AS prevName
FROM
wl_warehouse_structure s
) AS area ON area.id = structure.parent_id
LEFT JOIN wl_equipment we ON we.id = equipment_detail.equipment_id
LEFT JOIN wl_equipment_category category ON category.id = we.category_id
<where>
<if
test=
"equipCode != '' and equipCode != null"
>
and spec.code = #{equipCode}
</if>
</where>
limit 1
</select>
...
...
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