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
82770fb4
Commit
82770fb4
authored
Oct 24, 2022
by
dqq
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
安装告知页面sql修改,修改代码位置
parent
6e22f7de
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
59 additions
and
28 deletions
+59
-28
InstallNoticeMapper.xml
...ugp-api/src/main/resources/mapper/InstallNoticeMapper.xml
+1
-1
InstallNoticeController.java
...ot/module/ugp/biz/controller/InstallNoticeController.java
+3
-27
InstallNoticeServiceImpl.java
...module/ugp/biz/service/impl/InstallNoticeServiceImpl.java
+55
-0
No files found.
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/resources/mapper/InstallNoticeMapper.xml
View file @
82770fb4
...
...
@@ -4,7 +4,7 @@
<!-- 查询安装告知申请页面-->
<select
id=
"installNoticePage"
resultType=
"com.yeejoin.amos.boot.module.ugp.api.dto.InstallNoticePageDto"
>
SELECT a.* ,u2.biz_org_name
,u1.biz_org_name
SELECT a.* ,u2.biz_org_name
AS inspectionUnit,u1.biz_org_name AS superviseDept
FROM (SELECT
tz_ugp_install_notice.sequence_nbr,
tz_ugp_project.`NAME`,
...
...
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/controller/InstallNoticeController.java
View file @
82770fb4
...
...
@@ -195,23 +195,9 @@ public class InstallNoticeController extends BaseController {
@PostMapping
(
value
=
"/saveInstallNotice"
)
@ApiOperation
(
httpMethod
=
"Post"
,
value
=
"新增安装告知申请"
,
notes
=
"新增安装告知申请"
)
public
ResponseModel
<
InstallNoticeDto
>
saveInstallNotice
(
@RequestBody
JSONObject
object
,
@RequestParam
(
required
=
false
)
String
noticeStatus
)
{
InstallNoticeDto
installNoticeDto
=
new
InstallNoticeDto
();
// final ProjectDto projectDto = projectServiceImpl.queryBySeq(object.getLong("name"));
installNoticeDto
.
setProjectId
(
object
.
getLong
(
"name"
));
installNoticeDto
.
setNoticeStatus
(
noticeStatus
);
installNoticeDto
.
setNoticeDate
(
new
Date
());
installNoticeDto
.
setApproved
(
false
);
// installNoticeDto.setOrganizationCode(orgServiceImpl.getOrgUsr().getBizOrgCode());
installNoticeDto
.
setLicenseNum
(
object
.
getString
(
"licenseNum"
));
installNoticeDto
.
setLicenseCompany
(
object
.
getString
(
"licenseCompany"
));
final
JSONArray
licenseAttch
=
object
.
getJSONArray
(
"licenseAttch"
);
final
JSONArray
contractAttch
=
object
.
getJSONArray
(
"contractAttch"
);
InstallNoticeDto
installNoticeDto
=
installNoticeServiceImpl
.
saveInstallNotice
(
object
,
noticeStatus
);
installNoticeDto
.
setLicenseAttch
(
JSON
.
toJSONString
(
licenseAttch
));
installNoticeDto
.
setContractAttch
(
JSON
.
toJSONString
(
contractAttch
));
// projectInitiationServiceImpl.execute(projectDto.getInstanceId(),installNoticeDto,"1");
return
ResponseHelper
.
buildResponse
(
installNoticeServiceImpl
.
createWithModel
(
installNoticeDto
));
}
...
...
@@ -225,17 +211,7 @@ public class InstallNoticeController extends BaseController {
@GetMapping
(
value
=
"/message/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据sequenceNbr安装告知信息"
,
notes
=
"根据sequenceNbr安装告知信息"
)
public
ResponseModel
<
JSONObject
>
selectOneBySeq
(
@PathVariable
Long
sequenceNbr
)
{
final
InstallNoticeDto
installNoticeDto
=
installNoticeServiceImpl
.
selectOneById
(
sequenceNbr
);
final
ProjectDto
projectDto
=
projectServiceImpl
.
queryBySeq
(
installNoticeDto
.
getProjectId
());
JSONObject
jsonObject
=
new
JSONObject
();
jsonObject
.
put
(
"name"
,
projectDto
.
getSequenceNbr
());
jsonObject
.
put
(
"installRegion"
,
projectDto
.
getInstallRegion
());
jsonObject
.
put
(
"licenseNum"
,
installNoticeDto
.
getLicenseNum
());
jsonObject
.
put
(
"licenseCompany"
,
installNoticeDto
.
getLicenseCompany
());
jsonObject
.
put
(
"licenseAttch"
,
JSON
.
parseArray
(
installNoticeDto
.
getLicenseAttch
()));
jsonObject
.
put
(
"contractAttch"
,
JSON
.
parseArray
(
installNoticeDto
.
getContractAttch
()));
return
ResponseHelper
.
buildResponse
(
jsonObject
);
return
ResponseHelper
.
buildResponse
(
installNoticeServiceImpl
.
selectOneBySeq
(
sequenceNbr
));
}
/**
...
...
@@ -281,7 +257,7 @@ public class InstallNoticeController extends BaseController {
if
(
noticeStatus
.
equals
(
"已提交"
)||
noticeStatus
.
equals
(
"已保存"
)){
return
ResponseHelper
.
buildResponse
(
installNoticeServiceImpl
.
removeById
(
sequenceNbr
));
}
return
null
;
return
ResponseHelper
.
buildResponse
(
false
)
;
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
...
...
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/service/impl/InstallNoticeServiceImpl.java
View file @
82770fb4
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
biz
.
service
.
impl
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.InstallNoticePageDto
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.ProjectDto
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.InstallNotice
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.InstallNoticeMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.service.IInstallNoticeService
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.InstallNoticeDto
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.springframework.stereotype.Service
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.sql.Wrapper
;
import
java.util.Date
;
import
java.util.List
;
/**
...
...
@@ -27,6 +36,8 @@ public class InstallNoticeServiceImpl extends BaseService<InstallNoticeDto,Insta
@Autowired
InstallNoticeMapper
installNoticeMapper
;
@Autowired
ProjectServiceImpl
projectServiceImpl
;
/**
* 分页查询
*/
...
...
@@ -56,4 +67,47 @@ public class InstallNoticeServiceImpl extends BaseService<InstallNoticeDto,Insta
public
InstallNoticeDto
selectOneById
(
Long
sequenceNbr
){
return
installNoticeMapper
.
selectoneById
(
sequenceNbr
);
}
/**
* 新增安装告知申请,保存/提交
*
* @return
*/
public
InstallNoticeDto
saveInstallNotice
(
JSONObject
object
,
String
noticeStatus
)
{
InstallNoticeDto
installNoticeDto
=
new
InstallNoticeDto
();
// final ProjectDto projectDto = projectServiceImpl.queryBySeq(object.getLong("name"));
installNoticeDto
.
setProjectId
(
object
.
getLong
(
"name"
));
installNoticeDto
.
setNoticeStatus
(
noticeStatus
);
installNoticeDto
.
setNoticeDate
(
new
Date
());
installNoticeDto
.
setApproved
(
false
);
// installNoticeDto.setOrganizationCode(orgServiceImpl.getOrgUsr().getBizOrgCode());
installNoticeDto
.
setLicenseNum
(
object
.
getString
(
"licenseNum"
));
installNoticeDto
.
setLicenseCompany
(
object
.
getString
(
"licenseCompany"
));
final
JSONArray
licenseAttch
=
object
.
getJSONArray
(
"licenseAttch"
);
final
JSONArray
contractAttch
=
object
.
getJSONArray
(
"contractAttch"
);
installNoticeDto
.
setLicenseAttch
(
JSON
.
toJSONString
(
licenseAttch
));
installNoticeDto
.
setContractAttch
(
JSON
.
toJSONString
(
contractAttch
));
// projectInitiationServiceImpl.execute(projectDto.getInstanceId(),installNoticeDto,"1");
return
installNoticeDto
;
}
/**
* 根据sequenceNbr查询安装告知信息及附件
*
* @param sequenceNbr 主键
* @return
*/
public
JSONObject
selectOneBySeq
(
Long
sequenceNbr
)
{
final
InstallNoticeDto
installNoticeDto
=
selectOneById
(
sequenceNbr
);
final
ProjectDto
projectDto
=
projectServiceImpl
.
queryBySeq
(
installNoticeDto
.
getProjectId
());
JSONObject
jsonObject
=
new
JSONObject
();
jsonObject
.
put
(
"name"
,
projectDto
.
getSequenceNbr
());
jsonObject
.
put
(
"installRegion"
,
projectDto
.
getInstallRegion
());
jsonObject
.
put
(
"licenseNum"
,
installNoticeDto
.
getLicenseNum
());
jsonObject
.
put
(
"licenseCompany"
,
installNoticeDto
.
getLicenseCompany
());
jsonObject
.
put
(
"licenseAttch"
,
JSON
.
parseArray
(
installNoticeDto
.
getLicenseAttch
()));
jsonObject
.
put
(
"contractAttch"
,
JSON
.
parseArray
(
installNoticeDto
.
getContractAttch
()));
return
jsonObject
;
}
}
\ 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