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
d8c5fa23
Commit
d8c5fa23
authored
Apr 25, 2023
by
chenzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改代码
parent
f755efd8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
14 deletions
+37
-14
InputItemController.java
.../amos/patrol/business/controller/InputItemController.java
+18
-2
InputItemExcelVo.java
...om/yeejoin/amos/patrol/business/dto/InputItemExcelVo.java
+8
-8
dbTemplate_input_item.xml
...ol/src/main/resources/db/mapper/dbTemplate_input_item.xml
+11
-4
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/controller/InputItemController.java
View file @
d8c5fa23
...
@@ -87,6 +87,8 @@ public class InputItemController extends AbstractBaseController {
...
@@ -87,6 +87,8 @@ public class InputItemController extends AbstractBaseController {
*/
*/
private
static
final
String
EQUIP_AND_FIRE_TREE
=
"EQUIP_AND_FIRE_TREE:"
;
private
static
final
String
EQUIP_AND_FIRE_TREE
=
"EQUIP_AND_FIRE_TREE:"
;
private
static
final
String
ITEMTYPE
=
"选择,文本:"
;
/**
/**
* 新加接口*****************************************************************************
* 新加接口*****************************************************************************
...
@@ -376,11 +378,11 @@ public class InputItemController extends AbstractBaseController {
...
@@ -376,11 +378,11 @@ public class InputItemController extends AbstractBaseController {
//此处对数据做统一处理 拼接为易读内容
//此处对数据做统一处理 拼接为易读内容
for
(
InputItemExcelVo
inputItemExcelDto
:
content
)
{
for
(
InputItemExcelVo
inputItemExcelDto
:
content
)
{
String
text
=
""
;
String
text
=
""
;
if
(
inputItemExcelDto
.
getItemType
().
equals
(
"选择"
)&&
!
inputItemExcelDto
.
getDataJson
().
equals
(
"[]"
))
{
if
(
inputItemExcelDto
.
getItemType
().
equals
(
"选择"
)&&
!
inputItemExcelDto
.
getDataJson
().
equals
(
"[]"
)
&&
!
inputItemExcelDto
.
getDataJson
().
equals
(
""
)
)
{
List
<
Map
>
maps
=
JSONObject
.
parseArray
(
inputItemExcelDto
.
getDataJson
(),
Map
.
class
);
List
<
Map
>
maps
=
JSONObject
.
parseArray
(
inputItemExcelDto
.
getDataJson
(),
Map
.
class
);
for
(
int
i
=
0
;
i
<
maps
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
maps
.
size
();
i
++)
{
Map
jsonObject
=
maps
.
get
(
i
);
Map
jsonObject
=
maps
.
get
(
i
);
text
=
text
+
jsonObject
.
get
(
"name"
)+
","
+
jsonObject
.
get
(
"score"
)+
","
+
jsonObject
.
get
(
"isOk"
)+
",
"
+
jsonObject
.
get
(
"isChecked"
);
text
=
text
+
"名称:"
+
jsonObject
.
get
(
"name"
)+
" "
+
"评分:"
+
jsonObject
.
get
(
"score"
)+
" "
+
"选择是否合格:"
+
jsonObject
.
get
(
"isOk"
)+
" "
+
"默认选中:
"
+
jsonObject
.
get
(
"isChecked"
);
if
(
i
<
(
maps
.
size
()-
1
)
){
if
(
i
<
(
maps
.
size
()-
1
)
){
text
=
text
+
"|"
;
text
=
text
+
"|"
;
inputItemExcelDto
.
setDataJson
(
text
);
inputItemExcelDto
.
setDataJson
(
text
);
...
@@ -389,6 +391,20 @@ public class InputItemController extends AbstractBaseController {
...
@@ -389,6 +391,20 @@ public class InputItemController extends AbstractBaseController {
}
}
}
}
}
}
if
(
ITEMTYPE
.
contains
(
inputItemExcelDto
.
getItemType
())
&&
!
inputItemExcelDto
.
getPictureJson
().
equals
(
"[]"
)&&
!
inputItemExcelDto
.
getPictureJson
().
equals
(
""
))
{
List
<
Map
>
maps
=
JSONObject
.
parseArray
(
inputItemExcelDto
.
getPictureJson
(),
Map
.
class
);
text
=
""
;
for
(
int
i
=
0
;
i
<
maps
.
size
();
i
++)
{
Map
jsonObject
=
maps
.
get
(
i
);
text
=
text
+
"名称:"
+
jsonObject
.
get
(
"name"
)+
","
+
"是否拍照:"
+
jsonObject
.
get
(
"isMust"
);
if
(
i
<
(
maps
.
size
()-
1
)
){
text
=
text
+
"|"
;
inputItemExcelDto
.
setPictureJson
(
text
);
}
else
{
inputItemExcelDto
.
setPictureJson
(
text
);
}
}
}
if
(
inputItemExcelDto
.
getItemType
().
equals
(
"数字"
)
||
inputItemExcelDto
.
getItemType
().
equals
(
"文本"
))
{
if
(
inputItemExcelDto
.
getItemType
().
equals
(
"数字"
)
||
inputItemExcelDto
.
getItemType
().
equals
(
"文本"
))
{
//此处为避免大量set方法 将data_json字段中的数据转为对象组装
//此处为避免大量set方法 将data_json字段中的数据转为对象组装
InputItemDataJsonlDto
inputItemDataJsonlDto
=
JSONObject
.
parseObject
(
inputItemExcelDto
.
getDataJson
(),
InputItemDataJsonlDto
.
class
);
InputItemDataJsonlDto
inputItemDataJsonlDto
=
JSONObject
.
parseObject
(
inputItemExcelDto
.
getDataJson
(),
InputItemDataJsonlDto
.
class
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/dto/InputItemExcelVo.java
View file @
d8c5fa23
package
com
.
yeejoin
.
amos
.
patrol
.
business
.
dto
;
package
com
.
yeejoin
.
amos
.
patrol
.
business
.
dto
;
import
cn.jiguang.common.utils.StringUtils
;
import
com.alibaba.excel.annotation.ExcelIgnore
;
import
com.alibaba.excel.annotation.ExcelIgnore
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
...
@@ -9,6 +8,7 @@ import com.yeejoin.amos.patrol.common.enums.PointCheckTypeEnum;
...
@@ -9,6 +8,7 @@ import com.yeejoin.amos.patrol.common.enums.PointCheckTypeEnum;
import
com.yeejoin.amos.patrol.common.enums.PointLevelEnum
;
import
com.yeejoin.amos.patrol.common.enums.PointLevelEnum
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
liquibase.pro.packaged.S
;
import
lombok.Data
;
import
lombok.Data
;
...
@@ -66,7 +66,7 @@ public class InputItemExcelVo extends BaseDto {
...
@@ -66,7 +66,7 @@ public class InputItemExcelVo extends BaseDto {
@ExcelProperty
(
value
=
"拍照项(文本/选择)"
,
index
=
14
)
@ExcelProperty
(
value
=
"拍照项(文本/选择)"
,
index
=
14
)
@ApiModelProperty
(
value
=
"拍照项"
)
@ApiModelProperty
(
value
=
"拍照项"
)
private
Object
pictureJson
;
private
String
pictureJson
;
@ExplicitConstraint
(
indexNum
=
11
,
source
=
{
"是"
,
"否"
})
@ExplicitConstraint
(
indexNum
=
11
,
source
=
{
"是"
,
"否"
})
@ExcelProperty
(
value
=
"是否必填"
,
index
=
11
)
@ExcelProperty
(
value
=
"是否必填"
,
index
=
11
)
...
@@ -117,19 +117,19 @@ public class InputItemExcelVo extends BaseDto {
...
@@ -117,19 +117,19 @@ public class InputItemExcelVo extends BaseDto {
@ExcelProperty
(
value
=
"强制校验,输入值不能大于有效值上限(数字)"
,
index
=
22
)
@ExcelProperty
(
value
=
"强制校验,输入值不能大于有效值上限(数字)"
,
index
=
22
)
@ApiModelProperty
(
value
=
"强制校验,输入值不能大于有效值上限"
)
@ApiModelProperty
(
value
=
"强制校验,输入值不能大于有效值上限"
)
private
String
checkValidUp
=
"false"
;
private
String
checkValidUp
;
@ExcelProperty
(
value
=
"强制校验,输入值不能小于有效值下限(数字)"
,
index
=
23
)
@ExcelProperty
(
value
=
"强制校验,输入值不能小于有效值下限(数字)"
,
index
=
23
)
@ApiModelProperty
(
value
=
"强制校验,输入值不能小于有效值下限"
)
@ApiModelProperty
(
value
=
"强制校验,输入值不能小于有效值下限"
)
private
String
checkValidDown
=
"false"
;
private
String
checkValidDown
;
@ExcelProperty
(
value
=
"合格判断,输入值大于合格值上限时为不合格(数字)"
,
index
=
24
)
@ExcelProperty
(
value
=
"合格判断,输入值大于合格值上限时为不合格(数字)"
,
index
=
24
)
@ApiModelProperty
(
value
=
"合格判断,输入值大于合格值上限时为不合格"
)
@ApiModelProperty
(
value
=
"合格判断,输入值大于合格值上限时为不合格"
)
private
String
checkOkUp
=
"false"
;
private
String
checkOkUp
;
@ExcelProperty
(
value
=
"合格判断,输入值小于合格值上限时为不合格(数字)"
,
index
=
25
)
@ExcelProperty
(
value
=
"合格判断,输入值小于合格值上限时为不合格(数字)"
,
index
=
25
)
@ApiModelProperty
(
value
=
"合格判断,输入值小于合格值上限时为不合格"
)
@ApiModelProperty
(
value
=
"合格判断,输入值小于合格值上限时为不合格"
)
private
String
checkOkDown
=
"false"
;
private
String
checkOkDown
;
@ExcelProperty
(
value
=
"小数点后位数(数字)"
,
index
=
26
)
@ExcelProperty
(
value
=
"小数点后位数(数字)"
,
index
=
26
)
@ApiModelProperty
(
value
=
"小数点后位数"
)
@ApiModelProperty
(
value
=
"小数点后位数"
)
...
@@ -446,11 +446,11 @@ public class InputItemExcelVo extends BaseDto {
...
@@ -446,11 +446,11 @@ public class InputItemExcelVo extends BaseDto {
this
.
orgCode
=
orgCode
;
this
.
orgCode
=
orgCode
;
}
}
public
Object
getPictureJson
()
{
public
String
getPictureJson
()
{
return
pictureJson
;
return
pictureJson
;
}
}
public
void
setPictureJson
(
Object
pictureJson
)
{
public
void
setPictureJson
(
String
pictureJson
)
{
this
.
pictureJson
=
pictureJson
;
this
.
pictureJson
=
pictureJson
;
}
}
...
...
amos-boot-system-patrol/src/main/resources/db/mapper/dbTemplate_input_item.xml
View file @
d8c5fa23
...
@@ -398,7 +398,18 @@
...
@@ -398,7 +398,18 @@
IFNULL(a.key_parts_type,1) AS keyPartsType,
IFNULL(a.key_parts_type,1) AS keyPartsType,
IFNULL(a.custom_type,1) AS customType,
IFNULL(a.custom_type,1) AS customType,
a.risk_desc,
a.risk_desc,
(CASE a.data_json
WHEN '[]' THEN
''
ELSE
a.data_json
a.data_json
END ) AS dataJson,
(CASE a.picture_json
WHEN '[]' THEN
''
ELSE
a.picture_json
END ) AS pictureJson
from
from
p_input_item a left join p_catalog_tree b on a.catalog_id = b.id
p_input_item a left join p_catalog_tree b on a.catalog_id = b.id
where a.is_delete = '0'
where a.is_delete = '0'
...
@@ -441,10 +452,6 @@
...
@@ -441,10 +452,6 @@
<when
test=
"level!=null and level != '-0'"
>
and a.level = #{level}
</when>
<when
test=
"level!=null and level != '-0'"
>
and a.level = #{level}
</when>
</choose>
</choose>
order by a.id desc
order by a.id desc
<choose>
<when
test=
"pageSize==-1"
></when>
<when
test=
"pageSize!=-1"
>
limit #{offset},#{pageSize}
</when>
</choose>
</select>
</select>
<select
id=
"getEquipParentCode"
resultType=
"map"
>
<select
id=
"getEquipParentCode"
resultType=
"map"
>
...
...
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