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
b6645dec
Commit
b6645dec
authored
Jul 08, 2024
by
韩桐桐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(jg):使用登记,安装告知审核通过后维护登记证表和证的流水记录表
parent
2c09465d
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
47 additions
and
4 deletions
+47
-4
JgUseRegistrationMapper.java
...os/boot/module/jg/api/mapper/JgUseRegistrationMapper.java
+5
-0
CommonServiceImpl.java
...os/boot/module/jg/biz/service/impl/CommonServiceImpl.java
+1
-1
JgInstallationNoticeServiceImpl.java
.../jg/biz/service/impl/JgInstallationNoticeServiceImpl.java
+41
-3
JgUseRegistrationServiceImpl.java
...ule/jg/biz/service/impl/JgUseRegistrationServiceImpl.java
+0
-0
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/mapper/JgUseRegistrationMapper.java
View file @
b6645dec
...
...
@@ -9,6 +9,7 @@ import com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistration;
import
com.yeejoin.amos.boot.module.jg.api.vo.SortVo
;
import
org.apache.ibatis.annotations.MapKey
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Select
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -69,5 +70,9 @@ public interface JgUseRegistrationMapper extends BaseMapper<JgUseRegistration> {
List
<
CompanyEquipCountDto
>
queryForFlowingEquipList
();
Map
<
String
,
String
>
getEquTypeByUseRegSeq
(
@Param
(
"sequenceNbr"
)
String
sequenceNbr
);
Map
<
String
,
String
>
getEquTypeByVehSeq
(
@Param
(
"sequenceNbr"
)
String
sequenceNbr
);
@Select
(
"select name from tz_equipment_category where code=#{code}"
)
String
getEquCategoryNameByCode
(
String
code
);
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/CommonServiceImpl.java
View file @
b6645dec
...
...
@@ -2049,7 +2049,7 @@ public class CommonServiceImpl implements ICommonService {
}
catch
(
ParseException
e
)
{
log
.
error
(
"日期转换失败:"
,
e
);
}
String
equCode
=
Optional
.
ofNullable
(
equType
.
get
(
"equ
Define"
)).
orElse
(
equType
.
get
(
"equCategory
"
));
String
equCode
=
Optional
.
ofNullable
(
equType
.
get
(
"equ
CategoryCode"
)).
orElse
(
equType
.
get
(
"equDefineCode
"
));
String
registrationCode
=
equCode
+
receiveCompanyCode
+
ym
;
ResponseModel
<
String
>
responseModel
=
tzsServiceFeignClient
.
deviceRegistrationCode
(
registrationCode
);
return
responseModel
.
getResult
();
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/JgInstallationNoticeServiceImpl.java
View file @
b6645dec
...
...
@@ -7,6 +7,7 @@ import com.alibaba.fastjson.JSONObject;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.baomidou.mybatisplus.core.toolkit.Sequence
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.github.pagehelper.util.StringUtil
;
import
com.yeejoin.amos.boot.biz.common.bo.CompanyBo
;
...
...
@@ -17,9 +18,7 @@ import com.yeejoin.amos.boot.biz.common.utils.DateUtils;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.module.jg.api.dto.*
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgInstallationNotice
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgInstallationNoticeEq
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgRegistrationHistory
;
import
com.yeejoin.amos.boot.module.jg.api.entity.*
;
import
com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.CompanyTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgInstallationNoticeEqMapper
;
...
...
@@ -76,6 +75,7 @@ import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
javax.servlet.http.HttpServletResponse
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
import
java.util.concurrent.TimeUnit
;
import
java.util.function.Function
;
...
...
@@ -137,6 +137,8 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
@Autowired
AmosRequestContext
amosRequestContext
;
@Autowired
private
Sequence
sequence
;
@Autowired
CodeUtil
codeUtil
;
@Autowired
CommonServiceImpl
commonServiceImpl
;
...
...
@@ -166,6 +168,11 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
private
TzBaseEnterpriseInfoMapper
tzBaseEnterpriseInfoMapper
;
@Autowired
private
JgRegistrationHistoryMapper
jgRegistrationHistoryMapper
;
@Autowired
JgCertificateChangeRecordServiceImpl
certificateChangeRecordService
;
@Autowired
JgCertificateChangeRecordEqServiceImpl
certificateChangeRecordEqService
;
/**
* 根据sequenceNbr查询
...
...
@@ -1046,6 +1053,31 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
taskMap
.
put
(
"model"
,
taskMessageDto
);
TaskV2Model
taskV2Model1
=
commonService
.
updateTaskModel
(
taskMap
);
// 生成一条tzs_jg_certificate_change_record记录
JgCertificateChangeRecord
jgCertificateChangeRecord
=
new
JgCertificateChangeRecord
();
jgCertificateChangeRecord
.
setApplyNo
(
jgInstallationNotice
.
getApplyNo
());
jgCertificateChangeRecord
.
setReceiveOrgName
(
jgInstallationNotice
.
getReceiveOrgName
());
jgCertificateChangeRecord
.
setAuditPassDate
(
new
Date
());
jgCertificateChangeRecord
.
setRegType
(
BusinessTypeEnum
.
JG_INSTALLATION_NOTIFICATION
.
getName
());
jgCertificateChangeRecord
.
setRegDate
(
jgInstallationNotice
.
getInstallStartDate
());
jgCertificateChangeRecord
.
setChangeContent
(
this
.
buildRecordContent
(
jgInstallationNotice
));
//变更内容
jgCertificateChangeRecord
.
setUseRegistrationCode
(
registrationCode
);
//使用登记编号
jgCertificateChangeRecord
.
setReceiveCompanyCode
(
jgInstallationNotice
.
getReceiveCompanyOrgCode
());
//接收机构公司代码
jgCertificateChangeRecord
.
setCertificateNo
(
""
);
//登记证书唯一码
jgCertificateChangeRecord
.
setUseUnitCreditCode
(
jgInstallationNotice
.
getUseUnitCreditCode
());
//使用单位统一信用代码
jgCertificateChangeRecord
.
setUseUnitName
(
jgInstallationNotice
.
getUseUnitName
());
//使用单位名称
jgCertificateChangeRecord
.
setEquCategory
(
idxBizJgRegisterInfo
.
getEquCategory
());
//设备类别编码
jgCertificateChangeRecord
.
setCreateDate
(
new
Date
());
jgCertificateChangeRecord
.
setSequenceNbr
(
sequence
.
nextId
());
certificateChangeRecordService
.
save
(
jgCertificateChangeRecord
);
// 生成tzs_jg_certificate_change_record_eq记录
JgCertificateChangeRecordEq
changeRecordEq
=
new
JgCertificateChangeRecordEq
();
changeRecordEq
.
setChangeRecordId
(
jgCertificateChangeRecord
.
getSequenceNbr
().
toString
());
//登记证记录主键
changeRecordEq
.
setRecDate
(
new
Date
());
changeRecordEq
.
setEquId
(
idxBizJgRegisterInfo
.
getRecord
());
//设备主键
certificateChangeRecordEqService
.
save
(
changeRecordEq
);
jgResumeInfoService
.
createWithModel
(
JgResumeInfoDto
.
builder
()
.
applyNo
(
jgInstallationNotice
.
getApplyNo
())
.
businessType
(
BusinessTypeEnum
.
JG_INSTALLATION_NOTIFICATION
.
getName
())
...
...
@@ -1168,6 +1200,12 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
tzsServiceFeignClient
.
commonUpdateEsDataByIds
(
objMap
);
}
private
String
buildRecordContent
(
JgInstallationNotice
obj
)
{
//张三办理了【单位变更】 ,单号【DWBG202407050001】,办理日期2024-07-05
SimpleDateFormat
simpleDateFormat
=
new
SimpleDateFormat
(
"yyyyMMdd"
);
return
obj
.
getCreateUserName
()
+
"办理了【"
+
BusinessTypeEnum
.
JG_INSTALLATION_NOTIFICATION
.
getName
()+
"】,单号【"
+
obj
.
getApplyNo
()
+
"】,申请日期"
+
simpleDateFormat
.
format
(
obj
.
getCreateDate
());
}
/**
* 系统类型的code 自动生成设备代码
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/JgUseRegistrationServiceImpl.java
View file @
b6645dec
This diff is collapsed.
Click to expand it.
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