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
6e22f7de
Commit
6e22f7de
authored
Oct 23, 2022
by
dqq
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
项目管材页面,查看,删除
parent
24158764
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
103 additions
and
9 deletions
+103
-9
ProjectMaterialDto.java
...join/amos/boot/module/ugp/api/dto/ProjectMaterialDto.java
+75
-0
ProjectResourceMapper.java
...mos/boot/module/ugp/api/mapper/ProjectResourceMapper.java
+1
-1
ProjectResourceMapper.xml
...p-api/src/main/resources/mapper/ProjectResourceMapper.xml
+6
-6
ProjectResourceController.java
.../module/ugp/biz/controller/ProjectResourceController.java
+21
-2
No files found.
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/dto/ProjectMaterialDto.java
0 → 100644
View file @
6e22f7de
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
api
.
dto
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
java.util.Date
;
/**
* 材料信息表
*
* @author system_generator
* @date 2022-09-22
*/
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@ApiModel
(
value
=
"MaterialDto"
,
description
=
"材料信息表"
)
public
class
ProjectMaterialDto
extends
BaseDto
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"名称"
)
private
String
name
;
@ApiModelProperty
(
value
=
"项目id"
)
private
Long
companyId
;
@ApiModelProperty
(
value
=
"管材编号"
)
private
String
code
;
@ApiModelProperty
(
value
=
"管材类别"
)
private
String
type
;
@ApiModelProperty
(
value
=
"管材规格"
)
private
String
spec
;
@ApiModelProperty
(
value
=
"管材壁厚"
)
private
Integer
wallThickness
;
@ApiModelProperty
(
value
=
"生产厂家"
)
private
String
manufacturer
;
@ApiModelProperty
(
value
=
"生产日期"
)
private
Date
manufactureDate
;
@ApiModelProperty
(
value
=
"生产编号"
)
private
String
batchNum
;
@ApiModelProperty
(
value
=
"管道直径"
)
private
Double
diameter
;
@ApiModelProperty
(
value
=
"管道材料"
)
private
String
material
;
@ApiModelProperty
(
value
=
"管道长度"
)
private
Double
length
;
@ApiModelProperty
(
value
=
"厂家所在地"
)
private
String
manufactureAddr
;
@ApiModelProperty
(
value
=
"是否审批通过(1通过,0未通过)"
)
private
Boolean
approved
;
@ApiModelProperty
(
value
=
"单位机构代码"
)
private
String
orgCode
;
@ApiModelProperty
(
value
=
"项目名称"
)
private
String
projectName
;
@ApiModelProperty
(
value
=
"项目资源id"
)
private
Long
projectResourceId
;
}
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/mapper/ProjectResourceMapper.java
View file @
6e22f7de
...
@@ -29,7 +29,7 @@ public interface ProjectResourceMapper extends BaseMapper<ProjectResource> {
...
@@ -29,7 +29,7 @@ public interface ProjectResourceMapper extends BaseMapper<ProjectResource> {
WelderEquipmentDto
customSelectById
(
@Param
(
"sequenceNbr"
)
Long
sequenceNbr
);
WelderEquipmentDto
customSelectById
(
@Param
(
"sequenceNbr"
)
Long
sequenceNbr
);
//管材页面分页,根据名称、编号筛选
//管材页面分页,根据名称、编号筛选
Page
<
MaterialDto
>
MaterialPage
(
IPage
<
MaterialDto
>
page
,
@Param
(
"name"
)
String
name
,
@Param
(
"code"
)
String
code
);
Page
<
ProjectMaterialDto
>
MaterialPage
(
IPage
<
Project
MaterialDto
>
page
,
@Param
(
"name"
)
String
name
,
@Param
(
"code"
)
String
code
);
//根据resource_id删除项目焊工人员信息
//根据resource_id删除项目焊工人员信息
Boolean
deleteByResourceId
(
Long
resourceId
);
Boolean
deleteByResourceId
(
Long
resourceId
);
...
...
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/resources/mapper/ProjectResourceMapper.xml
View file @
6e22f7de
...
@@ -97,12 +97,12 @@
...
@@ -97,12 +97,12 @@
</select>
</select>
<!-- //管材页面分页,根据名称、编号筛选-->
<!-- //管材页面分页,根据名称、编号筛选-->
<!-- Page<MaterialDto> MaterialPage(IPage<MaterialDto> page ,@Param("name") String name, @Param("code") String code);--
>
<select
id=
"MaterialPage"
resultType=
"com.yeejoin.amos.boot.module.ugp.api.dto.ProjectMaterialDto"
>
<select
id=
"MaterialPage"
resultType=
"com.yeejoin.amos.boot.module.ugp.api.dto.MaterialDto"
>
SELECT tz_ugp_material.*,tz_ugp_project.name AS projectName ,tz_ugp_project_resource.sequence_nbr as projectResourceId
SELECT tz_ugp_material.* FROM tz_ugp_material,tz_ugp_project_resource ,tz_ugp_project
FROM tz_ugp_project_resource
WHERE tz_ugp_project_resource.project_id=tz_ugp_project
.sequence_nbr
LEFT JOIN tz_ugp_material ON tz_ugp_project_resource.resource_id=tz_ugp_material
.sequence_nbr
AND tz_ugp_project_resource.resource_id=tz_ugp_material
.sequence_nbr
LEFT JOIN tz_ugp_project ON tz_ugp_project_resource.project_id=tz_ugp_project
.sequence_nbr
AND
tz_ugp_project_resource.type="material"
WHERE
tz_ugp_project_resource.type="material"
AND tz_ugp_material.name LIKE '%${name}%' AND tz_ugp_material.code LIKE '%${code}%'
AND tz_ugp_material.name LIKE '%${name}%' AND tz_ugp_material.code LIKE '%${code}%'
</select>
</select>
...
...
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/controller/ProjectResourceController.java
View file @
6e22f7de
...
@@ -2,11 +2,13 @@ package com.yeejoin.amos.boot.module.ugp.biz.controller;
...
@@ -2,11 +2,13 @@ package com.yeejoin.amos.boot.module.ugp.biz.controller;
import
com.netflix.ribbon.proxy.annotation.Http
;
import
com.netflix.ribbon.proxy.annotation.Http
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.MaterialDto
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.MaterialDto
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.ProjectMaterialDto
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.WelderEquipmentDto
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.WelderEquipmentDto
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.ProjectResource
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.ProjectResource
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.ProjectMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.ProjectMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.ProjectResourceMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.ProjectResourceMapper
;
import
com.yeejoin.amos.boot.module.ugp.biz.service.impl.MaterialServiceImpl
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
...
@@ -44,6 +46,8 @@ public class ProjectResourceController extends BaseController {
...
@@ -44,6 +46,8 @@ public class ProjectResourceController extends BaseController {
@Autowired
@Autowired
ProjectResourceMapper
projectResourceMapper
;
ProjectResourceMapper
projectResourceMapper
;
@Autowired
MaterialServiceImpl
materialServiceImpl
;
/**
/**
* 新增项目资源表(包括焊工、管材、设备)
* 新增项目资源表(包括焊工、管材、设备)
...
@@ -198,15 +202,30 @@ public class ProjectResourceController extends BaseController {
...
@@ -198,15 +202,30 @@ public class ProjectResourceController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/materialPage"
)
@GetMapping
(
value
=
"/materialPage"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"焊机设备分页查询"
,
notes
=
"焊机设备分页查询"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"焊机设备分页查询"
,
notes
=
"焊机设备分页查询"
)
public
ResponseModel
<
Page
<
MaterialDto
>>
queryForMaterialPage
(
public
ResponseModel
<
Page
<
Project
MaterialDto
>>
queryForMaterialPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
,
@RequestParam
(
value
=
"size"
)
int
size
,
@RequestParam
(
value
=
"name"
,
required
=
false
)
String
name
,
@RequestParam
(
value
=
"name"
,
required
=
false
)
String
name
,
@RequestParam
(
value
=
"code"
,
required
=
false
)
String
code
@RequestParam
(
value
=
"code"
,
required
=
false
)
String
code
)
{
)
{
Page
<
MaterialDto
>
page
=
new
Page
<
MaterialDto
>();
Page
<
ProjectMaterialDto
>
page
=
new
Page
<
Project
MaterialDto
>();
page
.
setCurrent
(
current
);
page
.
setCurrent
(
current
);
page
.
setSize
(
size
);
page
.
setSize
(
size
);
return
ResponseHelper
.
buildResponse
(
projectResourceMapper
.
MaterialPage
(
page
,
name
,
code
));
return
ResponseHelper
.
buildResponse
(
projectResourceMapper
.
MaterialPage
(
page
,
name
,
code
));
}
}
/**
* 根据sequenceNbr查询项目材料
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"IM/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据sequenceNbr查询材料和附件"
,
notes
=
"根据sequenceNbr查询材料和附件"
)
public
ResponseModel
<
JSONObject
>
selectIMOne
(
@PathVariable
Long
sequenceNbr
)
{
JSONObject
jsonObject
=
materialServiceImpl
.
groupBySeq
(
sequenceNbr
);
jsonObject
.
getLong
(
"sequenceNbr"
);
return
ResponseHelper
.
buildResponse
(
materialServiceImpl
.
groupBySeq
(
sequenceNbr
));
}
}
}
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