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
a4db10bd
Commit
a4db10bd
authored
Sep 13, 2021
by
高建强
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
item:监督检查业务接口新增及调整
parent
0974b6e1
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
151 additions
and
102 deletions
+151
-102
InputItemMapper.java
...amos/supervision/business/dao/mapper/InputItemMapper.java
+2
-0
IInputItemDao.java
...os/supervision/business/dao/repository/IInputItemDao.java
+0
-3
InputItemPageParam.java
...n/amos/supervision/business/param/InputItemPageParam.java
+107
-87
RoutePointItemServiceImpl.java
...sion/business/service/impl/RoutePointItemServiceImpl.java
+19
-6
InputItemParamUtil.java
...in/amos/supervision/business/util/InputItemParamUtil.java
+6
-6
dbTemplate_input_item.xml
...on/src/main/resources/db/mapper/dbTemplate_input_item.xml
+17
-0
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/dao/mapper/InputItemMapper.java
View file @
a4db10bd
...
@@ -38,4 +38,6 @@ public interface InputItemMapper {
...
@@ -38,4 +38,6 @@ public interface InputItemMapper {
void
updatePointById
(
Map
<
String
,
Object
>
param
);
void
updatePointById
(
Map
<
String
,
Object
>
param
);
List
<
Long
>
getIds
();
List
<
Long
>
getIds
();
List
<
InputItem
>
findByIdIn
(
@Param
(
"list"
)
List
<
Long
>
inputItemIds
);
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/dao/repository/IInputItemDao.java
View file @
a4db10bd
...
@@ -22,9 +22,6 @@ public interface IInputItemDao extends BaseDao<InputItem, Long> {
...
@@ -22,9 +22,6 @@ public interface IInputItemDao extends BaseDao<InputItem, Long> {
@Query
(
value
=
"select * from p_input_item where original_id in ?1 and is_delete =0"
,
nativeQuery
=
true
)
@Query
(
value
=
"select * from p_input_item where original_id in ?1 and is_delete =0"
,
nativeQuery
=
true
)
List
<
InputItem
>
listByOriginalIds
(
List
<
String
>
originalIds
);
List
<
InputItem
>
listByOriginalIds
(
List
<
String
>
originalIds
);
@Query
(
value
=
"select * from p_input_item where id in ?1 and is_delete =0"
,
nativeQuery
=
true
)
List
<
InputItem
>
listByIds
(
List
<
Long
>
ids
);
@Query
(
value
=
"select * from p_input_item where item_no = ?1 and equipment_name = ?2 and is_delete =0"
,
nativeQuery
=
true
)
@Query
(
value
=
"select * from p_input_item where item_no = ?1 and equipment_name = ?2 and is_delete =0"
,
nativeQuery
=
true
)
List
<
InputItem
>
findByItemNoAndEquipmentName
(
String
itemNo
,
String
equipmentName
);
List
<
InputItem
>
findByItemNoAndEquipmentName
(
String
itemNo
,
String
equipmentName
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/param/InputItemPageParam.java
View file @
a4db10bd
...
@@ -4,91 +4,111 @@ import com.yeejoin.amos.supervision.core.common.request.CommonPageable;
...
@@ -4,91 +4,111 @@ import com.yeejoin.amos.supervision.core.common.request.CommonPageable;
import
java.util.List
;
import
java.util.List
;
public
class
InputItemPageParam
extends
CommonPageable
{
public
class
InputItemPageParam
extends
CommonPageable
{
private
String
isScore
;
private
String
isScore
;
private
String
itemType
;
private
String
itemType
;
private
String
name
;
private
String
name
;
private
String
level
;
private
String
level
;
private
String
itemNo
;
private
String
itemNo
;
private
String
checkTypeId
;
private
String
checkTypeId
;
/**
private
String
itemStart
;
* 机构
/**
*/
* 机构
private
String
orgCode
;
*/
private
String
orgCode
;
private
String
inputClassify
;
private
String
inputClassify
;
public
String
getItemClassify
()
{
return
itemClassify
;
public
String
getItemClassify
()
{
}
return
itemClassify
;
}
public
void
setItemClassify
(
String
itemClassify
)
{
this
.
itemClassify
=
itemClassify
;
public
void
setItemClassify
(
String
itemClassify
)
{
}
this
.
itemClassify
=
itemClassify
;
}
private
String
itemClassify
;
private
String
itemClassify
;
public
String
getInputClassify
()
{
return
inputClassify
;
public
String
getInputClassify
()
{
}
return
inputClassify
;
}
public
void
setInputClassify
(
String
inputClassify
)
{
this
.
inputClassify
=
inputClassify
;
public
void
setInputClassify
(
String
inputClassify
)
{
}
this
.
inputClassify
=
inputClassify
;
}
private
List
<
Long
>
catalogIds
;
private
List
<
Long
>
catalogIds
;
public
String
getItemNo
()
{
return
itemNo
;
public
String
getItemNo
()
{
}
return
itemNo
;
public
void
setItemNo
(
String
itemNo
)
{
}
this
.
itemNo
=
itemNo
;
}
public
void
setItemNo
(
String
itemNo
)
{
public
String
getLevel
()
{
this
.
itemNo
=
itemNo
;
return
level
;
}
}
public
void
setLevel
(
String
level
)
{
public
String
getLevel
()
{
this
.
level
=
level
;
return
level
;
}
}
public
String
getIsScore
()
{
return
isScore
;
public
void
setLevel
(
String
level
)
{
}
this
.
level
=
level
;
public
void
setIsScore
(
String
isScore
)
{
}
this
.
isScore
=
isScore
;
}
public
String
getIsScore
()
{
public
String
getItemType
()
{
return
isScore
;
return
itemType
;
}
}
public
void
setItemType
(
String
itemType
)
{
public
void
setIsScore
(
String
isScore
)
{
this
.
itemType
=
itemType
;
this
.
isScore
=
isScore
;
}
}
public
String
getName
()
{
return
name
;
public
String
getItemType
()
{
}
return
itemType
;
public
void
setName
(
String
name
)
{
}
this
.
name
=
name
;
}
public
void
setItemType
(
String
itemType
)
{
public
String
getOrgCode
()
{
this
.
itemType
=
itemType
;
return
orgCode
;
}
}
public
void
setOrgCode
(
String
orgCode
)
{
public
String
getName
()
{
this
.
orgCode
=
orgCode
;
return
name
;
}
}
public
List
<
Long
>
getCatalogIds
()
{
public
void
setName
(
String
name
)
{
return
catalogIds
;
this
.
name
=
name
;
}
}
public
void
setCatalogIds
(
List
<
Long
>
catalogIds
)
{
public
String
getOrgCode
()
{
this
.
catalogIds
=
catalogIds
;
return
orgCode
;
}
}
public
String
getCheckTypeId
()
{
public
void
setOrgCode
(
String
orgCode
)
{
return
checkTypeId
;
this
.
orgCode
=
orgCode
;
}
}
public
void
setCheckTypeId
(
String
checkTypeId
)
{
public
List
<
Long
>
getCatalogIds
()
{
this
.
checkTypeId
=
checkTypeId
;
return
catalogIds
;
}
}
public
void
setCatalogIds
(
List
<
Long
>
catalogIds
)
{
this
.
catalogIds
=
catalogIds
;
}
public
String
getCheckTypeId
()
{
return
checkTypeId
;
}
public
void
setCheckTypeId
(
String
checkTypeId
)
{
this
.
checkTypeId
=
checkTypeId
;
}
public
String
getItemStart
()
{
return
itemStart
;
}
public
void
setItemStart
(
String
itemStart
)
{
this
.
itemStart
=
itemStart
;
}
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/service/impl/RoutePointItemServiceImpl.java
View file @
a4db10bd
package
com
.
yeejoin
.
amos
.
supervision
.
business
.
service
.
impl
;
package
com
.
yeejoin
.
amos
.
supervision
.
business
.
service
.
impl
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Lists
;
import
com.yeejoin.amos.supervision.business.dao.repository.IInputItemDao
;
import
com.yeejoin.amos.supervision.business.dao.mapper.InputItemMapper
;
import
com.yeejoin.amos.supervision.business.dao.mapper.RoutePointItemMapper
;
import
com.yeejoin.amos.supervision.business.dao.repository.IRoutePointDao
;
import
com.yeejoin.amos.supervision.business.dao.repository.IRoutePointDao
;
import
com.yeejoin.amos.supervision.business.dao.repository.IRoutePointItemDao
;
import
com.yeejoin.amos.supervision.business.dao.repository.IRoutePointItemDao
;
import
com.yeejoin.amos.supervision.business.service.intfc.IRoutePointItemService
;
import
com.yeejoin.amos.supervision.business.service.intfc.IRoutePointItemService
;
...
@@ -24,10 +25,13 @@ public class RoutePointItemServiceImpl implements IRoutePointItemService {
...
@@ -24,10 +25,13 @@ public class RoutePointItemServiceImpl implements IRoutePointItemService {
private
IRoutePointItemDao
routePointItemDao
;
private
IRoutePointItemDao
routePointItemDao
;
@Autowired
@Autowired
private
I
InputItemDao
inputItem
Dao
;
private
I
RoutePointDao
routePoint
Dao
;
@Autowired
@Autowired
private
IRoutePointDao
routePointDao
;
private
InputItemMapper
inputItemMapper
;
@Autowired
private
RoutePointItemMapper
routePointItemMapper
;
@Override
@Override
public
List
<
RoutePointItem
>
addRoutePointItemList
(
Plan
plan
,
List
<
Long
>
inputItemIds
,
String
userId
)
{
public
List
<
RoutePointItem
>
addRoutePointItemList
(
Plan
plan
,
List
<
Long
>
inputItemIds
,
String
userId
)
{
...
@@ -35,14 +39,15 @@ public class RoutePointItemServiceImpl implements IRoutePointItemService {
...
@@ -35,14 +39,15 @@ public class RoutePointItemServiceImpl implements IRoutePointItemService {
Long
routeId
=
plan
.
getRouteId
();
Long
routeId
=
plan
.
getRouteId
();
if
(
CollectionUtils
.
isNotEmpty
(
inputItemIds
)
&&
routeId
!=
null
&&
planId
!=
null
)
{
if
(
CollectionUtils
.
isNotEmpty
(
inputItemIds
)
&&
routeId
!=
null
&&
planId
!=
null
)
{
routePointItemDao
.
deleteByPlanId
(
planId
);
routePointItemDao
.
deleteByPlanId
(
planId
);
List
<
InputItem
>
inputItemList
=
inputItem
Dao
.
listByIds
(
inputItemIds
);
List
<
InputItem
>
inputItemList
=
inputItem
Mapper
.
findByIdIn
(
inputItemIds
);
List
<
RoutePoint
>
routePointList
=
routePointDao
.
findByRouteId
(
routeId
);
List
<
RoutePoint
>
routePointList
=
routePointDao
.
findByRouteId
(
routeId
);
if
(
CollectionUtils
.
isNotEmpty
(
inputItemList
)
&&
CollectionUtils
.
isNotEmpty
(
routePointList
))
{
if
(
CollectionUtils
.
isNotEmpty
(
inputItemList
)
&&
CollectionUtils
.
isNotEmpty
(
routePointList
))
{
List
<
RoutePointItem
>
list
=
new
ArrayList
<>();
List
<
RoutePointItem
>
list
=
new
ArrayList
<>();
routePointList
.
stream
().
forEach
(
route
->
{
routePointList
.
stream
().
forEach
(
route
->
{
Long
routePointId
=
route
.
getId
();
Long
routePointId
=
route
.
getId
();
inputItemList
.
stream
().
forEach
(
item
->
{
inputItemList
.
stream
().
forEach
(
item
->
{
RoutePointItem
routePointItem
=
new
RoutePointItem
();
RoutePointItem
routePointItem
=
new
RoutePointItem
();
routePointItem
.
setPlanId
(
planId
);
routePointItem
.
setInputItemId
(
item
.
getId
());
routePointItem
.
setInputItemId
(
item
.
getId
());
routePointItem
.
setBasisJson
(
item
.
getBasisJson
());
routePointItem
.
setBasisJson
(
item
.
getBasisJson
());
routePointItem
.
setOrderNo
(
item
.
getOrderNo
());
routePointItem
.
setOrderNo
(
item
.
getOrderNo
());
...
@@ -57,4 +62,12 @@ public class RoutePointItemServiceImpl implements IRoutePointItemService {
...
@@ -57,4 +62,12 @@ public class RoutePointItemServiceImpl implements IRoutePointItemService {
}
}
return
Lists
.
newArrayList
();
return
Lists
.
newArrayList
();
}
}
// @Override
// public Page<RoutePointItemVo> queryPage(InputItemPageParam param) {
// long total = routePointItemMapper.queryPageCount(param);
// List<RoutePointItemVo> content = routePointItemMapper.queryPage(param);
// Page<RoutePointItemVo> result = new PageImpl<RoutePointItemVo>(content, param, total);
// return result;
// }
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/util/InputItemParamUtil.java
View file @
a4db10bd
package
com
.
yeejoin
.
amos
.
supervision
.
business
.
util
;
package
com
.
yeejoin
.
amos
.
supervision
.
business
.
util
;
import
java.sql.PreparedStatement
;
import
java.util.HashMap
;
import
java.util.List
;
import
com.yeejoin.amos.supervision.business.param.InputItemPageParam
;
import
com.yeejoin.amos.supervision.business.param.InputItemPageParam
;
import
org.springframework.util.ObjectUtils
;
import
com.yeejoin.amos.supervision.core.common.request.CommonPageable
;
import
com.yeejoin.amos.supervision.core.common.request.CommonPageable
;
import
com.yeejoin.amos.supervision.core.common.request.CommonRequest
;
import
com.yeejoin.amos.supervision.core.common.request.CommonRequest
;
import
com.yeejoin.amos.supervision.dao.entity.InputItem
;
import
com.yeejoin.amos.supervision.dao.entity.InputItem
;
import
org.springframework.util.ObjectUtils
;
import
java.util.HashMap
;
import
java.util.List
;
public
class
InputItemParamUtil
{
public
class
InputItemParamUtil
{
...
@@ -60,6 +58,8 @@ public class InputItemParamUtil {
...
@@ -60,6 +58,8 @@ public class InputItemParamUtil {
param
.
setItemClassify
(
toString
(
queryRequests
.
get
(
i
).
getValue
()));
param
.
setItemClassify
(
toString
(
queryRequests
.
get
(
i
).
getValue
()));
}
else
if
(
"checkTypeId"
.
equals
(
name
))
{
}
else
if
(
"checkTypeId"
.
equals
(
name
))
{
param
.
setCheckTypeId
(
toString
(
queryRequests
.
get
(
i
).
getValue
()));
param
.
setCheckTypeId
(
toString
(
queryRequests
.
get
(
i
).
getValue
()));
}
else
if
(
"itemStart"
.
equals
(
name
))
{
param
.
setCheckTypeId
(
toString
(
queryRequests
.
get
(
i
).
getValue
()));
}
}
}
}
}
}
...
...
amos-boot-system-supervision/src/main/resources/db/mapper/dbTemplate_input_item.xml
View file @
a4db10bd
...
@@ -127,6 +127,7 @@
...
@@ -127,6 +127,7 @@
<if
test=
"itemNo!=null"
>
and a.item_no like concat(concat("%",#{itemNo}),"%")
</if>
<if
test=
"itemNo!=null"
>
and a.item_no like concat(concat("%",#{itemNo}),"%")
</if>
<if
test=
"itemType!=null"
>
and a.item_Type = #{itemType}
</if>
<if
test=
"itemType!=null"
>
and a.item_Type = #{itemType}
</if>
<if
test=
"checkTypeId!=null"
>
and a.check_type_Val = #{checkTypeId}
</if>
<if
test=
"checkTypeId!=null"
>
and a.check_type_Val = #{checkTypeId}
</if>
<if
test=
"itemStart!=null"
>
and a.item_start = #{itemStart}
</if>
<!-- <if test="orgCode!=null"> and a.org_Code = #{orgCode}</if>-->
<!-- <if test="orgCode!=null"> and a.org_Code = #{orgCode}</if>-->
<if
test=
"itemClassify != null"
>
and a.item_classify = #{itemClassify}
</if>
<if
test=
"itemClassify != null"
>
and a.item_classify = #{itemClassify}
</if>
order by a.id desc
order by a.id desc
...
@@ -313,4 +314,19 @@
...
@@ -313,4 +314,19 @@
WHERE
WHERE
is_delete = 0
is_delete = 0
</select>
</select>
<select
id=
"findByIdIn"
resultType=
"com.yeejoin.amos.supervision.dao.entity.InputItem"
>
SELECT
*
FROM
p_input_item
<where>
is_delete = 0
<if
test=
"list != null and list.size() >0"
>
AND id IN
<foreach
collection=
"list"
item=
"item"
index=
"index"
open=
"("
close=
")"
separator=
","
>
#{item}
</foreach>
</if>
</where>
</select>
</mapper>
</mapper>
\ No newline at end of file
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