Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yd-backend
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
AutogeneralShanghai
yd-backend
Commits
5cad6c31
Commit
5cad6c31
authored
Mar 22, 2021
by
yao.xiao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
测试印章上传
parent
a9bc0382
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
1389 additions
and
9 deletions
+1389
-9
yd-api/src/main/java/com/yd/api/agms/AgmsController.java
+27
-8
yd-api/src/main/java/com/yd/api/agms/service/AgmsInsurerService.java
+20
-0
yd-api/src/main/java/com/yd/api/agms/service/impl/AgmsInsurerServiceImpl.java
+85
-0
yd-api/src/main/java/com/yd/api/agms/vo/insurer/SealUploadResponseVO.java
+59
-0
yd-api/src/main/java/com/yd/dal/entity/customer/AclInsurerBranch.java
+84
-0
yd-api/src/main/java/com/yd/dal/entity/customer/AclInsurerBranchDept.java
+82
-0
yd-api/src/main/java/com/yd/dal/mapper/customer/AclInsurerBranchDeptMapper.java
+26
-0
yd-api/src/main/java/com/yd/dal/mapper/customer/AclInsurerBranchMapper.java
+26
-0
yd-api/src/main/java/com/yd/dal/service/customer/AclInsurerBranchDALService.java
+10
-0
yd-api/src/main/java/com/yd/dal/service/customer/AclInsurerBranchDeptDALService.java
+12
-0
yd-api/src/main/java/com/yd/dal/service/customer/impl/AclInsurerBranchDALServiceImpl.java
+22
-0
yd-api/src/main/java/com/yd/dal/service/customer/impl/AclInsurerBranchDeptDALServiceImpl.java
+24
-0
yd-api/src/main/resources/mapper/customer/AclInsurerBranchDeptMapper.xml
+444
-0
yd-api/src/main/resources/mapper/customer/AclInsurerBranchMapper.xml
+467
-0
yd-api/src/main/resources/pdfconfiguration.properties
+1
-1
No files found.
yd-api/src/main/java/com/yd/api/agms/AgmsController.java
View file @
5cad6c31
package
com
.
yd
.
api
.
agms
;
package
com
.
yd
.
api
.
agms
;
import
com.yd.api.agms.service.AgmsDashboardService
;
import
com.yd.api.agms.service.*
;
import
com.yd.api.agms.service.AgmsFortuneService
;
import
com.yd.api.agms.service.AgmsHiringService
;
import
com.yd.api.agms.vo.dashboard.*
;
import
com.yd.api.agms.vo.dashboard.*
;
import
com.yd.api.agms.service.AgmsStatisticsService
;
import
com.yd.api.agms.vo.fortune.*
;
import
com.yd.api.agms.vo.fortune.*
;
import
com.yd.api.agms.vo.hiring.*
;
import
com.yd.api.agms.vo.hiring.*
;
import
com.yd.api.agms.vo.insurer.SealUploadResponseVO
;
import
com.yd.api.agms.vo.statistics.FinancialStatisticsRequestVO
;
import
com.yd.api.agms.vo.statistics.FinancialStatisticsRequestVO
;
import
com.yd.api.agms.vo.statistics.FinancialStatisticsResponseVO
;
import
com.yd.api.agms.vo.statistics.FinancialStatisticsResponseVO
;
import
com.yd.api.agms.vo.statistics.LeadsStatisticsRequestVO
;
import
com.yd.api.agms.vo.statistics.LeadsStatisticsRequestVO
;
...
@@ -16,10 +14,8 @@ import com.yd.api.practitioner.vo.hiring.HiringApproveResponseVO;
...
@@ -16,10 +14,8 @@ import com.yd.api.practitioner.vo.hiring.HiringApproveResponseVO;
import
com.yd.api.result.JsonResult
;
import
com.yd.api.result.JsonResult
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
...
@@ -35,6 +31,8 @@ public class AgmsController {
...
@@ -35,6 +31,8 @@ public class AgmsController {
private
AgmsFortuneService
agmsFortuneService
;
private
AgmsFortuneService
agmsFortuneService
;
@Autowired
@Autowired
private
AgmsHiringService
agmsHiringService
;
private
AgmsHiringService
agmsHiringService
;
@Autowired
private
AgmsInsurerService
agmsInsurerService
;
/**
/**
* AGMS -- 财务管理报表
* AGMS -- 财务管理报表
...
@@ -286,4 +284,25 @@ public class AgmsController {
...
@@ -286,4 +284,25 @@ public class AgmsController {
result
.
addResult
(
responseVO
);
result
.
addResult
(
responseVO
);
return
result
;
return
result
;
}
}
/**
* 上传公司印章接口
* @param sealFile
* @param loginId
* @param insurerBranchId
* @param insurerBranchDeptId
* @return
*/
@RequestMapping
(
value
=
"/sealUpload"
)
public
Object
sealUpload
(
@RequestParam
(
value
=
"sealFile"
)
MultipartFile
sealFile
,
@RequestParam
(
value
=
"loginId"
,
required
=
true
)
Long
loginId
,
@RequestParam
(
value
=
"insurerBranchId"
,
required
=
false
)
Long
insurerBranchId
,
@RequestParam
(
value
=
"insurerBranchDeptId"
,
required
=
false
)
Long
insurerBranchDeptId
)
{
JsonResult
result
=
new
JsonResult
();
SealUploadResponseVO
responseVO
=
agmsInsurerService
.
sealUpload
(
sealFile
,
loginId
,
insurerBranchId
,
insurerBranchDeptId
);
result
.
setData
(
responseVO
);
result
.
addResult
(
responseVO
);
return
result
;
}
}
}
yd-api/src/main/java/com/yd/api/agms/service/AgmsInsurerService.java
0 → 100644
View file @
5cad6c31
package
com
.
yd
.
api
.
agms
.
service
;
import
com.yd.api.agms.vo.hiring.PractitionerHiringListResponseVO
;
import
com.yd.api.agms.vo.insurer.SealUploadResponseVO
;
import
org.springframework.web.multipart.MultipartFile
;
/**
* @author xxy
*/
public
interface
AgmsInsurerService
{
/**
* 上传公司印章接口
* @param sealFile
* @param loginId
* @param insurerBranchId
* @param insurerBranchDeptId
* @return
*/
SealUploadResponseVO
sealUpload
(
MultipartFile
sealFile
,
Long
loginId
,
Long
insurerBranchId
,
Long
insurerBranchDeptId
);
}
yd-api/src/main/java/com/yd/api/agms/service/impl/AgmsInsurerServiceImpl.java
0 → 100644
View file @
5cad6c31
package
com
.
yd
.
api
.
agms
.
service
.
impl
;
import
com.yd.api.agms.service.AgmsInsurerService
;
import
com.yd.api.agms.vo.insurer.SealUploadResponseVO
;
import
com.yd.api.result.CommonResult
;
import
com.yd.dal.entity.customer.AclInsurerBranch
;
import
com.yd.dal.entity.customer.AclInsurerBranchDept
;
import
com.yd.dal.service.customer.AclInsurerBranchDALService
;
import
com.yd.dal.service.customer.AclInsurerBranchDeptDALService
;
import
com.yd.util.CommonUtil
;
import
com.yd.util.config.ZHBErrorConfig
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.context.annotation.PropertySource
;
import
org.springframework.stereotype.Service
;
import
org.springframework.web.multipart.MultipartFile
;
import
java.io.ByteArrayInputStream
;
import
java.io.File
;
import
java.io.FileOutputStream
;
import
java.io.InputStream
;
import
java.net.InetAddress
;
import
java.util.Date
;
/**
* @author xxy
*/
@Service
(
"agmsInsurerService"
)
@PropertySource
({
"classpath:pdfconfiguration.properties"
})
public
class
AgmsInsurerServiceImpl
implements
AgmsInsurerService
{
@Value
(
"${pdf.signImage}"
)
private
String
signImage
;
@Autowired
private
AclInsurerBranchDALService
aclInsurerBranchDALService
;
@Autowired
private
AclInsurerBranchDeptDALService
aclInsurerBranchDeptDALService
;
@Override
public
SealUploadResponseVO
sealUpload
(
MultipartFile
sealFile
,
Long
loginId
,
Long
insurerBranchId
,
Long
insurerBranchDeptId
)
{
SealUploadResponseVO
responseVO
=
new
SealUploadResponseVO
();
boolean
success
=
true
;
String
message
=
ZHBErrorConfig
.
getErrorInfo
(
"800000"
);
try
{
byte
[]
bytes
=
sealFile
.
getBytes
();
InputStream
in
=
new
ByteArrayInputStream
(
bytes
);
InetAddress
address
=
InetAddress
.
getLocalHost
();
File
outFile
=
new
File
(
signImage
+
sealFile
.
getName
());
System
.
out
.
println
(
"http://"
+
address
+
signImage
);
// File outFile = new File("D:\\"+sealFile.getOriginalFilename());
FileOutputStream
out
=
new
FileOutputStream
(
outFile
);
byte
[]
bts
=
new
byte
[
1024
];
int
len
=
0
;
while
((
len
=
in
.
read
(
bts
))
!=
-
1
)
{
out
.
write
(
bts
,
0
,
len
);
}
if
(!
CommonUtil
.
isNullOrZero
(
insurerBranchId
))
{
AclInsurerBranch
branch
=
new
AclInsurerBranch
();
branch
.
setId
(
insurerBranchId
);
branch
.
setElectronicTaxSeal
(
"http://"
+
address
+
signImage
);
branch
.
setUpdatedAt
(
new
Date
());
branch
.
setUpdatedBy
(
loginId
);
aclInsurerBranchDALService
.
update
(
branch
);
}
if
(!
CommonUtil
.
isNullOrZero
(
insurerBranchDeptId
))
{
AclInsurerBranchDept
dept
=
new
AclInsurerBranchDept
();
dept
.
setId
(
insurerBranchDeptId
);
dept
.
setElectronicTaxSeal
(
"http://"
+
address
+
signImage
);
dept
.
setUpdatedAt
(
new
Date
());
dept
.
setUpdatedBy
(
loginId
);
aclInsurerBranchDeptDALService
.
update
(
dept
);
}
responseVO
.
setFileUrl
(
"http://"
+
address
+
signImage
);
}
catch
(
Exception
e
)
{
success
=
false
;
message
=
ZHBErrorConfig
.
getErrorInfo
(
"830025"
);
e
.
printStackTrace
();
}
responseVO
.
setCommonResult
(
new
CommonResult
(
success
,
message
));
return
responseVO
;
}
}
yd-api/src/main/java/com/yd/api/agms/vo/insurer/SealUploadResponseVO.java
0 → 100644
View file @
5cad6c31
package
com
.
yd
.
api
.
agms
.
vo
.
insurer
;
import
com.yd.api.result.CommonResult
;
/**
* @author xxy
*/
public
class
SealUploadResponseVO
{
private
String
fileUrl
;
private
CommonResult
commonResult
;
/**
* 获取
*
* @return the commonResult
*/
public
CommonResult
getCommonResult
()
{
return
this
.
commonResult
;
}
/**
* 设置
*
* @param commonResult the to set
*/
public
void
setCommonResult
(
CommonResult
commonResult
)
{
this
.
commonResult
=
commonResult
;
}
/**
* 获取
*
* @return the fileUrl
*/
public
String
getFileUrl
()
{
return
this
.
fileUrl
;
}
/**
* 设置
*
* @param fileUrl the to set
*/
public
void
setFileUrl
(
String
fileUrl
)
{
this
.
fileUrl
=
fileUrl
;
}
@Override
public
String
toString
()
{
return
"SealUploadResponseVO{"
+
"fileUrl='"
+
fileUrl
+
'\''
+
", commonResult="
+
commonResult
+
'}'
;
}
}
yd-api/src/main/java/com/yd/dal/entity/customer/AclInsurerBranch.java
0 → 100644
View file @
5cad6c31
package
com
.
yd
.
dal
.
entity
.
customer
;
import
java.util.Date
;
import
lombok.Data
;
/**
* 保险公司分公司/营业部
*/
@Data
public
class
AclInsurerBranch
{
/**
* serial id
*/
private
Long
id
;
/**
* 分公司/营业部代码
*/
private
String
branchCode
;
/**
* FK ag_acl_insurer.id
*/
private
Long
insurerId
;
/**
* 保险公司名称
*/
private
String
insurerName
;
/**
* 分公司/营业部名称
*/
private
String
branchName
;
/**
* 0=No, 1=Yes
*/
private
Integer
isActive
;
/**
* 有效起日
*/
private
Date
effectiveStartDate
;
/**
* 有效终日
*/
private
Date
effectiveEndDate
;
/**
* 联系人
*/
private
String
contactName
;
/**
* 联系电话
*/
private
String
contactNo
;
/**
* 分公司地址
*/
private
String
address
;
/**
* 分公司电子印章
*/
private
String
electronicTaxSeal
;
/**
* 备注
*/
private
String
remark
;
private
Date
createdAt
;
private
Long
createdBy
;
private
Date
updatedAt
;
private
Long
updatedBy
;
}
\ No newline at end of file
yd-api/src/main/java/com/yd/dal/entity/customer/AclInsurerBranchDept.java
0 → 100644
View file @
5cad6c31
package
com
.
yd
.
dal
.
entity
.
customer
;
import
java.util.Date
;
import
lombok.Data
;
/**
* 经纪人所属部门
*/
@Data
public
class
AclInsurerBranchDept
{
/**
* serial id
*/
private
Long
id
;
/**
* FK ag_acl_insurer.id
*/
private
Long
insurerId
;
/**
* FK ag_acl_insurer.id
*/
private
Long
insurerBranchId
;
private
String
deptCode
;
/**
* dept name
*/
private
String
name
;
/**
* dept english name
*/
private
String
nameEn
;
/**
* 联系人
*/
private
String
contactName
;
/**
* 联系电话
*/
private
String
contactNo
;
/**
* 部门地址
*/
private
String
address
;
/**
* 经纪人所属部门电子印章
*/
private
String
electronicTaxSeal
;
/**
* memo or tips
*/
private
String
remark
;
/**
* 0=No, 1=Yes
*/
private
Integer
isActive
;
private
Date
createdAt
;
/**
* FK ag_acl_user.id
*/
private
Long
createdBy
;
private
Date
updatedAt
;
/**
* FK ag_acl_user.id
*/
private
Long
updatedBy
;
}
\ No newline at end of file
yd-api/src/main/java/com/yd/dal/mapper/customer/AclInsurerBranchDeptMapper.java
0 → 100644
View file @
5cad6c31
package
com
.
yd
.
dal
.
mapper
.
customer
;
import
com.yd.dal.entity.customer.AclInsurerBranchDept
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Param
;
public
interface
AclInsurerBranchDeptMapper
{
int
deleteByPrimaryKey
(
Long
id
);
int
insert
(
AclInsurerBranchDept
record
);
int
insertSelective
(
AclInsurerBranchDept
record
);
AclInsurerBranchDept
selectByPrimaryKey
(
Long
id
);
int
updateByPrimaryKeySelective
(
AclInsurerBranchDept
record
);
int
updateByPrimaryKey
(
AclInsurerBranchDept
record
);
int
updateBatch
(
List
<
AclInsurerBranchDept
>
list
);
int
updateBatchSelective
(
List
<
AclInsurerBranchDept
>
list
);
int
batchInsert
(
@Param
(
"list"
)
List
<
AclInsurerBranchDept
>
list
);
}
\ No newline at end of file
yd-api/src/main/java/com/yd/dal/mapper/customer/AclInsurerBranchMapper.java
0 → 100644
View file @
5cad6c31
package
com
.
yd
.
dal
.
mapper
.
customer
;
import
com.yd.dal.entity.customer.AclInsurerBranch
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Param
;
public
interface
AclInsurerBranchMapper
{
int
deleteByPrimaryKey
(
Long
id
);
int
insert
(
AclInsurerBranch
record
);
int
insertSelective
(
AclInsurerBranch
record
);
AclInsurerBranch
selectByPrimaryKey
(
Long
id
);
int
updateByPrimaryKeySelective
(
AclInsurerBranch
record
);
int
updateByPrimaryKey
(
AclInsurerBranch
record
);
int
updateBatch
(
List
<
AclInsurerBranch
>
list
);
int
updateBatchSelective
(
List
<
AclInsurerBranch
>
list
);
int
batchInsert
(
@Param
(
"list"
)
List
<
AclInsurerBranch
>
list
);
}
\ No newline at end of file
yd-api/src/main/java/com/yd/dal/service/customer/AclInsurerBranchDALService.java
0 → 100644
View file @
5cad6c31
package
com
.
yd
.
dal
.
service
.
customer
;
import
com.yd.dal.entity.customer.AclInsurerBranch
;
/**
* @author xxy
*/
public
interface
AclInsurerBranchDALService
{
void
update
(
AclInsurerBranch
branch
);
}
yd-api/src/main/java/com/yd/dal/service/customer/AclInsurerBranchDeptDALService.java
0 → 100644
View file @
5cad6c31
package
com
.
yd
.
dal
.
service
.
customer
;
import
com.yd.dal.entity.customer.AclInsurerBranchDept
;
import
java.util.List
;
/**
* @author xxy
*/
public
interface
AclInsurerBranchDeptDALService
{
void
update
(
AclInsurerBranchDept
dept
);
}
yd-api/src/main/java/com/yd/dal/service/customer/impl/AclInsurerBranchDALServiceImpl.java
0 → 100644
View file @
5cad6c31
package
com
.
yd
.
dal
.
service
.
customer
.
impl
;
import
com.yd.dal.entity.customer.AclInsurerBranch
;
import
com.yd.dal.mapper.customer.AclInsurerBranchMapper
;
import
com.yd.dal.service.customer.AclInsurerBranchDALService
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
/**
* @author xxy
*/
@Service
(
"aclInsurerBranchDALService"
)
public
class
AclInsurerBranchDALServiceImpl
implements
AclInsurerBranchDALService
{
@Resource
private
AclInsurerBranchMapper
mapper
;
@Override
public
void
update
(
AclInsurerBranch
branch
)
{
mapper
.
updateByPrimaryKeySelective
(
branch
);
}
}
yd-api/src/main/java/com/yd/dal/service/customer/impl/AclInsurerBranchDeptDALServiceImpl.java
0 → 100644
View file @
5cad6c31
package
com
.
yd
.
dal
.
service
.
customer
.
impl
;
import
com.yd.dal.entity.customer.AclInsurerBranchDept
;
import
com.yd.dal.mapper.customer.AclInsurerBranchDeptMapper
;
import
com.yd.dal.service.customer.AclInsurerBranchDeptDALService
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
java.util.List
;
/**
* @author xxy
*/
@Service
(
"aclInsurerBranchDeptDALService"
)
public
class
AclInsurerBranchDeptDALServiceImpl
implements
AclInsurerBranchDeptDALService
{
@Resource
private
AclInsurerBranchDeptMapper
mapper
;
@Override
public
void
update
(
AclInsurerBranchDept
dept
)
{
mapper
.
updateByPrimaryKeySelective
(
dept
);
}
}
yd-api/src/main/resources/mapper/customer/AclInsurerBranchDeptMapper.xml
0 → 100644
View file @
5cad6c31
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yd.dal.mapper.customer.AclInsurerBranchDeptMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.yd.dal.entity.customer.AclInsurerBranchDept"
>
<!--@mbg.generated-->
<!--@Table ag_acl_insurer_branch_dept-->
<id
column=
"id"
jdbcType=
"BIGINT"
property=
"id"
/>
<result
column=
"insurer_id"
jdbcType=
"BIGINT"
property=
"insurerId"
/>
<result
column=
"insurer_branch_id"
jdbcType=
"BIGINT"
property=
"insurerBranchId"
/>
<result
column=
"dept_code"
jdbcType=
"VARCHAR"
property=
"deptCode"
/>
<result
column=
"name"
jdbcType=
"VARCHAR"
property=
"name"
/>
<result
column=
"name_en"
jdbcType=
"VARCHAR"
property=
"nameEn"
/>
<result
column=
"contact_name"
jdbcType=
"VARCHAR"
property=
"contactName"
/>
<result
column=
"contact_no"
jdbcType=
"VARCHAR"
property=
"contactNo"
/>
<result
column=
"address"
jdbcType=
"VARCHAR"
property=
"address"
/>
<result
column=
"electronic_tax_seal"
jdbcType=
"VARCHAR"
property=
"electronicTaxSeal"
/>
<result
column=
"remark"
jdbcType=
"VARCHAR"
property=
"remark"
/>
<result
column=
"is_active"
jdbcType=
"INTEGER"
property=
"isActive"
/>
<result
column=
"created_at"
jdbcType=
"TIMESTAMP"
property=
"createdAt"
/>
<result
column=
"created_by"
jdbcType=
"BIGINT"
property=
"createdBy"
/>
<result
column=
"updated_at"
jdbcType=
"TIMESTAMP"
property=
"updatedAt"
/>
<result
column=
"updated_by"
jdbcType=
"BIGINT"
property=
"updatedBy"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
<!--@mbg.generated-->
id, insurer_id, insurer_branch_id, dept_code, `name`, name_en, contact_name, contact_no,
address, electronic_tax_seal, remark, is_active, created_at, created_by, updated_at,
updated_by
</sql>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Long"
resultMap=
"BaseResultMap"
>
<!--@mbg.generated-->
select
<include
refid=
"Base_Column_List"
/>
from ag_acl_insurer_branch_dept
where id = #{id,jdbcType=BIGINT}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
<!--@mbg.generated-->
delete from ag_acl_insurer_branch_dept
where id = #{id,jdbcType=BIGINT}
</delete>
<insert
id=
"insert"
keyColumn=
"id"
keyProperty=
"id"
parameterType=
"com.yd.dal.entity.customer.AclInsurerBranchDept"
useGeneratedKeys=
"true"
>
<!--@mbg.generated-->
insert into ag_acl_insurer_branch_dept (insurer_id, insurer_branch_id, dept_code,
`name`, name_en, contact_name,
contact_no, address, electronic_tax_seal,
remark, is_active, created_at,
created_by, updated_at, updated_by
)
values (#{insurerId,jdbcType=BIGINT}, #{insurerBranchId,jdbcType=BIGINT}, #{deptCode,jdbcType=VARCHAR},
#{name,jdbcType=VARCHAR}, #{nameEn,jdbcType=VARCHAR}, #{contactName,jdbcType=VARCHAR},
#{contactNo,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR}, #{electronicTaxSeal,jdbcType=VARCHAR},
#{remark,jdbcType=VARCHAR}, #{isActive,jdbcType=INTEGER}, #{createdAt,jdbcType=TIMESTAMP},
#{createdBy,jdbcType=BIGINT}, #{updatedAt,jdbcType=TIMESTAMP}, #{updatedBy,jdbcType=BIGINT}
)
</insert>
<insert
id=
"insertSelective"
keyColumn=
"id"
keyProperty=
"id"
parameterType=
"com.yd.dal.entity.customer.AclInsurerBranchDept"
useGeneratedKeys=
"true"
>
<!--@mbg.generated-->
insert into ag_acl_insurer_branch_dept
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"insurerId != null"
>
insurer_id,
</if>
<if
test=
"insurerBranchId != null"
>
insurer_branch_id,
</if>
<if
test=
"deptCode != null"
>
dept_code,
</if>
<if
test=
"name != null"
>
`name`,
</if>
<if
test=
"nameEn != null"
>
name_en,
</if>
<if
test=
"contactName != null"
>
contact_name,
</if>
<if
test=
"contactNo != null"
>
contact_no,
</if>
<if
test=
"address != null"
>
address,
</if>
<if
test=
"electronicTaxSeal != null"
>
electronic_tax_seal,
</if>
<if
test=
"remark != null"
>
remark,
</if>
<if
test=
"isActive != null"
>
is_active,
</if>
<if
test=
"createdAt != null"
>
created_at,
</if>
<if
test=
"createdBy != null"
>
created_by,
</if>
<if
test=
"updatedAt != null"
>
updated_at,
</if>
<if
test=
"updatedBy != null"
>
updated_by,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"insurerId != null"
>
#{insurerId,jdbcType=BIGINT},
</if>
<if
test=
"insurerBranchId != null"
>
#{insurerBranchId,jdbcType=BIGINT},
</if>
<if
test=
"deptCode != null"
>
#{deptCode,jdbcType=VARCHAR},
</if>
<if
test=
"name != null"
>
#{name,jdbcType=VARCHAR},
</if>
<if
test=
"nameEn != null"
>
#{nameEn,jdbcType=VARCHAR},
</if>
<if
test=
"contactName != null"
>
#{contactName,jdbcType=VARCHAR},
</if>
<if
test=
"contactNo != null"
>
#{contactNo,jdbcType=VARCHAR},
</if>
<if
test=
"address != null"
>
#{address,jdbcType=VARCHAR},
</if>
<if
test=
"electronicTaxSeal != null"
>
#{electronicTaxSeal,jdbcType=VARCHAR},
</if>
<if
test=
"remark != null"
>
#{remark,jdbcType=VARCHAR},
</if>
<if
test=
"isActive != null"
>
#{isActive,jdbcType=INTEGER},
</if>
<if
test=
"createdAt != null"
>
#{createdAt,jdbcType=TIMESTAMP},
</if>
<if
test=
"createdBy != null"
>
#{createdBy,jdbcType=BIGINT},
</if>
<if
test=
"updatedAt != null"
>
#{updatedAt,jdbcType=TIMESTAMP},
</if>
<if
test=
"updatedBy != null"
>
#{updatedBy,jdbcType=BIGINT},
</if>
</trim>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.yd.dal.entity.customer.AclInsurerBranchDept"
>
<!--@mbg.generated-->
update ag_acl_insurer_branch_dept
<set>
<if
test=
"insurerId != null"
>
insurer_id = #{insurerId,jdbcType=BIGINT},
</if>
<if
test=
"insurerBranchId != null"
>
insurer_branch_id = #{insurerBranchId,jdbcType=BIGINT},
</if>
<if
test=
"deptCode != null"
>
dept_code = #{deptCode,jdbcType=VARCHAR},
</if>
<if
test=
"name != null"
>
`name` = #{name,jdbcType=VARCHAR},
</if>
<if
test=
"nameEn != null"
>
name_en = #{nameEn,jdbcType=VARCHAR},
</if>
<if
test=
"contactName != null"
>
contact_name = #{contactName,jdbcType=VARCHAR},
</if>
<if
test=
"contactNo != null"
>
contact_no = #{contactNo,jdbcType=VARCHAR},
</if>
<if
test=
"address != null"
>
address = #{address,jdbcType=VARCHAR},
</if>
<if
test=
"electronicTaxSeal != null"
>
electronic_tax_seal = #{electronicTaxSeal,jdbcType=VARCHAR},
</if>
<if
test=
"remark != null"
>
remark = #{remark,jdbcType=VARCHAR},
</if>
<if
test=
"isActive != null"
>
is_active = #{isActive,jdbcType=INTEGER},
</if>
<if
test=
"createdAt != null"
>
created_at = #{createdAt,jdbcType=TIMESTAMP},
</if>
<if
test=
"createdBy != null"
>
created_by = #{createdBy,jdbcType=BIGINT},
</if>
<if
test=
"updatedAt != null"
>
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
</if>
<if
test=
"updatedBy != null"
>
updated_by = #{updatedBy,jdbcType=BIGINT},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.yd.dal.entity.customer.AclInsurerBranchDept"
>
<!--@mbg.generated-->
update ag_acl_insurer_branch_dept
set insurer_id = #{insurerId,jdbcType=BIGINT},
insurer_branch_id = #{insurerBranchId,jdbcType=BIGINT},
dept_code = #{deptCode,jdbcType=VARCHAR},
`name` = #{name,jdbcType=VARCHAR},
name_en = #{nameEn,jdbcType=VARCHAR},
contact_name = #{contactName,jdbcType=VARCHAR},
contact_no = #{contactNo,jdbcType=VARCHAR},
address = #{address,jdbcType=VARCHAR},
electronic_tax_seal = #{electronicTaxSeal,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR},
is_active = #{isActive,jdbcType=INTEGER},
created_at = #{createdAt,jdbcType=TIMESTAMP},
created_by = #{createdBy,jdbcType=BIGINT},
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
updated_by = #{updatedBy,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT}
</update>
<update
id=
"updateBatch"
parameterType=
"java.util.List"
>
<!--@mbg.generated-->
update ag_acl_insurer_branch_dept
<trim
prefix=
"set"
suffixOverrides=
","
>
<trim
prefix=
"insurer_id = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.insurerId,jdbcType=BIGINT}
</foreach>
</trim>
<trim
prefix=
"insurer_branch_id = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.insurerBranchId,jdbcType=BIGINT}
</foreach>
</trim>
<trim
prefix=
"dept_code = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.deptCode,jdbcType=VARCHAR}
</foreach>
</trim>
<trim
prefix=
"`name` = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.name,jdbcType=VARCHAR}
</foreach>
</trim>
<trim
prefix=
"name_en = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.nameEn,jdbcType=VARCHAR}
</foreach>
</trim>
<trim
prefix=
"contact_name = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.contactName,jdbcType=VARCHAR}
</foreach>
</trim>
<trim
prefix=
"contact_no = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.contactNo,jdbcType=VARCHAR}
</foreach>
</trim>
<trim
prefix=
"address = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.address,jdbcType=VARCHAR}
</foreach>
</trim>
<trim
prefix=
"electronic_tax_seal = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.electronicTaxSeal,jdbcType=VARCHAR}
</foreach>
</trim>
<trim
prefix=
"remark = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.remark,jdbcType=VARCHAR}
</foreach>
</trim>
<trim
prefix=
"is_active = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.isActive,jdbcType=INTEGER}
</foreach>
</trim>
<trim
prefix=
"created_at = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.createdAt,jdbcType=TIMESTAMP}
</foreach>
</trim>
<trim
prefix=
"created_by = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.createdBy,jdbcType=BIGINT}
</foreach>
</trim>
<trim
prefix=
"updated_at = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.updatedAt,jdbcType=TIMESTAMP}
</foreach>
</trim>
<trim
prefix=
"updated_by = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.updatedBy,jdbcType=BIGINT}
</foreach>
</trim>
</trim>
where id in
<foreach
close=
")"
collection=
"list"
item=
"item"
open=
"("
separator=
", "
>
#{item.id,jdbcType=BIGINT}
</foreach>
</update>
<update
id=
"updateBatchSelective"
parameterType=
"java.util.List"
>
<!--@mbg.generated-->
update ag_acl_insurer_branch_dept
<trim
prefix=
"set"
suffixOverrides=
","
>
<trim
prefix=
"insurer_id = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
<if
test=
"item.insurerId != null"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.insurerId,jdbcType=BIGINT}
</if>
</foreach>
</trim>
<trim
prefix=
"insurer_branch_id = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
<if
test=
"item.insurerBranchId != null"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.insurerBranchId,jdbcType=BIGINT}
</if>
</foreach>
</trim>
<trim
prefix=
"dept_code = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
<if
test=
"item.deptCode != null"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.deptCode,jdbcType=VARCHAR}
</if>
</foreach>
</trim>
<trim
prefix=
"`name` = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
<if
test=
"item.name != null"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.name,jdbcType=VARCHAR}
</if>
</foreach>
</trim>
<trim
prefix=
"name_en = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
<if
test=
"item.nameEn != null"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.nameEn,jdbcType=VARCHAR}
</if>
</foreach>
</trim>
<trim
prefix=
"contact_name = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
<if
test=
"item.contactName != null"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.contactName,jdbcType=VARCHAR}
</if>
</foreach>
</trim>
<trim
prefix=
"contact_no = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
<if
test=
"item.contactNo != null"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.contactNo,jdbcType=VARCHAR}
</if>
</foreach>
</trim>
<trim
prefix=
"address = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
<if
test=
"item.address != null"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.address,jdbcType=VARCHAR}
</if>
</foreach>
</trim>
<trim
prefix=
"electronic_tax_seal = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
<if
test=
"item.electronicTaxSeal != null"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.electronicTaxSeal,jdbcType=VARCHAR}
</if>
</foreach>
</trim>
<trim
prefix=
"remark = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
<if
test=
"item.remark != null"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.remark,jdbcType=VARCHAR}
</if>
</foreach>
</trim>
<trim
prefix=
"is_active = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
<if
test=
"item.isActive != null"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.isActive,jdbcType=INTEGER}
</if>
</foreach>
</trim>
<trim
prefix=
"created_at = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
<if
test=
"item.createdAt != null"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.createdAt,jdbcType=TIMESTAMP}
</if>
</foreach>
</trim>
<trim
prefix=
"created_by = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
<if
test=
"item.createdBy != null"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.createdBy,jdbcType=BIGINT}
</if>
</foreach>
</trim>
<trim
prefix=
"updated_at = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
<if
test=
"item.updatedAt != null"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.updatedAt,jdbcType=TIMESTAMP}
</if>
</foreach>
</trim>
<trim
prefix=
"updated_by = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
<if
test=
"item.updatedBy != null"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.updatedBy,jdbcType=BIGINT}
</if>
</foreach>
</trim>
</trim>
where id in
<foreach
close=
")"
collection=
"list"
item=
"item"
open=
"("
separator=
", "
>
#{item.id,jdbcType=BIGINT}
</foreach>
</update>
<insert
id=
"batchInsert"
keyColumn=
"id"
keyProperty=
"id"
parameterType=
"map"
useGeneratedKeys=
"true"
>
<!--@mbg.generated-->
insert into ag_acl_insurer_branch_dept
(insurer_id, insurer_branch_id, dept_code, `name`, name_en, contact_name, contact_no,
address, electronic_tax_seal, remark, is_active, created_at, created_by, updated_at,
updated_by)
values
<foreach
collection=
"list"
item=
"item"
separator=
","
>
(#{item.insurerId,jdbcType=BIGINT}, #{item.insurerBranchId,jdbcType=BIGINT}, #{item.deptCode,jdbcType=VARCHAR},
#{item.name,jdbcType=VARCHAR}, #{item.nameEn,jdbcType=VARCHAR}, #{item.contactName,jdbcType=VARCHAR},
#{item.contactNo,jdbcType=VARCHAR}, #{item.address,jdbcType=VARCHAR}, #{item.electronicTaxSeal,jdbcType=VARCHAR},
#{item.remark,jdbcType=VARCHAR}, #{item.isActive,jdbcType=INTEGER}, #{item.createdAt,jdbcType=TIMESTAMP},
#{item.createdBy,jdbcType=BIGINT}, #{item.updatedAt,jdbcType=TIMESTAMP}, #{item.updatedBy,jdbcType=BIGINT}
)
</foreach>
</insert>
</mapper>
\ No newline at end of file
yd-api/src/main/resources/mapper/customer/AclInsurerBranchMapper.xml
0 → 100644
View file @
5cad6c31
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yd.dal.mapper.customer.AclInsurerBranchMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.yd.dal.entity.customer.AclInsurerBranch"
>
<!--@mbg.generated-->
<!--@Table ag_acl_insurer_branch-->
<id
column=
"id"
jdbcType=
"BIGINT"
property=
"id"
/>
<result
column=
"branch_code"
jdbcType=
"VARCHAR"
property=
"branchCode"
/>
<result
column=
"insurer_id"
jdbcType=
"BIGINT"
property=
"insurerId"
/>
<result
column=
"insurer_name"
jdbcType=
"VARCHAR"
property=
"insurerName"
/>
<result
column=
"branch_name"
jdbcType=
"VARCHAR"
property=
"branchName"
/>
<result
column=
"is_active"
jdbcType=
"INTEGER"
property=
"isActive"
/>
<result
column=
"effective_start_date"
jdbcType=
"DATE"
property=
"effectiveStartDate"
/>
<result
column=
"effective_end_date"
jdbcType=
"DATE"
property=
"effectiveEndDate"
/>
<result
column=
"contact_name"
jdbcType=
"VARCHAR"
property=
"contactName"
/>
<result
column=
"contact_no"
jdbcType=
"VARCHAR"
property=
"contactNo"
/>
<result
column=
"address"
jdbcType=
"VARCHAR"
property=
"address"
/>
<result
column=
"electronic_tax_seal"
jdbcType=
"VARCHAR"
property=
"electronicTaxSeal"
/>
<result
column=
"remark"
jdbcType=
"LONGVARCHAR"
property=
"remark"
/>
<result
column=
"created_at"
jdbcType=
"TIMESTAMP"
property=
"createdAt"
/>
<result
column=
"created_by"
jdbcType=
"BIGINT"
property=
"createdBy"
/>
<result
column=
"updated_at"
jdbcType=
"TIMESTAMP"
property=
"updatedAt"
/>
<result
column=
"updated_by"
jdbcType=
"BIGINT"
property=
"updatedBy"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
<!--@mbg.generated-->
id, branch_code, insurer_id, insurer_name, branch_name, is_active, effective_start_date,
effective_end_date, contact_name, contact_no, address, electronic_tax_seal, remark,
created_at, created_by, updated_at, updated_by
</sql>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Long"
resultMap=
"BaseResultMap"
>
<!--@mbg.generated-->
select
<include
refid=
"Base_Column_List"
/>
from ag_acl_insurer_branch
where id = #{id,jdbcType=BIGINT}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
<!--@mbg.generated-->
delete from ag_acl_insurer_branch
where id = #{id,jdbcType=BIGINT}
</delete>
<insert
id=
"insert"
keyColumn=
"id"
keyProperty=
"id"
parameterType=
"com.yd.dal.entity.customer.AclInsurerBranch"
useGeneratedKeys=
"true"
>
<!--@mbg.generated-->
insert into ag_acl_insurer_branch (branch_code, insurer_id, insurer_name,
branch_name, is_active, effective_start_date,
effective_end_date, contact_name, contact_no,
address, electronic_tax_seal, remark,
created_at, created_by, updated_at,
updated_by)
values (#{branchCode,jdbcType=VARCHAR}, #{insurerId,jdbcType=BIGINT}, #{insurerName,jdbcType=VARCHAR},
#{branchName,jdbcType=VARCHAR}, #{isActive,jdbcType=INTEGER}, #{effectiveStartDate,jdbcType=DATE},
#{effectiveEndDate,jdbcType=DATE}, #{contactName,jdbcType=VARCHAR}, #{contactNo,jdbcType=VARCHAR},
#{address,jdbcType=VARCHAR}, #{electronicTaxSeal,jdbcType=VARCHAR}, #{remark,jdbcType=LONGVARCHAR},
#{createdAt,jdbcType=TIMESTAMP}, #{createdBy,jdbcType=BIGINT}, #{updatedAt,jdbcType=TIMESTAMP},
#{updatedBy,jdbcType=BIGINT})
</insert>
<insert
id=
"insertSelective"
keyColumn=
"id"
keyProperty=
"id"
parameterType=
"com.yd.dal.entity.customer.AclInsurerBranch"
useGeneratedKeys=
"true"
>
<!--@mbg.generated-->
insert into ag_acl_insurer_branch
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"branchCode != null"
>
branch_code,
</if>
<if
test=
"insurerId != null"
>
insurer_id,
</if>
<if
test=
"insurerName != null"
>
insurer_name,
</if>
<if
test=
"branchName != null"
>
branch_name,
</if>
<if
test=
"isActive != null"
>
is_active,
</if>
<if
test=
"effectiveStartDate != null"
>
effective_start_date,
</if>
<if
test=
"effectiveEndDate != null"
>
effective_end_date,
</if>
<if
test=
"contactName != null"
>
contact_name,
</if>
<if
test=
"contactNo != null"
>
contact_no,
</if>
<if
test=
"address != null"
>
address,
</if>
<if
test=
"electronicTaxSeal != null"
>
electronic_tax_seal,
</if>
<if
test=
"remark != null"
>
remark,
</if>
<if
test=
"createdAt != null"
>
created_at,
</if>
<if
test=
"createdBy != null"
>
created_by,
</if>
<if
test=
"updatedAt != null"
>
updated_at,
</if>
<if
test=
"updatedBy != null"
>
updated_by,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"branchCode != null"
>
#{branchCode,jdbcType=VARCHAR},
</if>
<if
test=
"insurerId != null"
>
#{insurerId,jdbcType=BIGINT},
</if>
<if
test=
"insurerName != null"
>
#{insurerName,jdbcType=VARCHAR},
</if>
<if
test=
"branchName != null"
>
#{branchName,jdbcType=VARCHAR},
</if>
<if
test=
"isActive != null"
>
#{isActive,jdbcType=INTEGER},
</if>
<if
test=
"effectiveStartDate != null"
>
#{effectiveStartDate,jdbcType=DATE},
</if>
<if
test=
"effectiveEndDate != null"
>
#{effectiveEndDate,jdbcType=DATE},
</if>
<if
test=
"contactName != null"
>
#{contactName,jdbcType=VARCHAR},
</if>
<if
test=
"contactNo != null"
>
#{contactNo,jdbcType=VARCHAR},
</if>
<if
test=
"address != null"
>
#{address,jdbcType=VARCHAR},
</if>
<if
test=
"electronicTaxSeal != null"
>
#{electronicTaxSeal,jdbcType=VARCHAR},
</if>
<if
test=
"remark != null"
>
#{remark,jdbcType=LONGVARCHAR},
</if>
<if
test=
"createdAt != null"
>
#{createdAt,jdbcType=TIMESTAMP},
</if>
<if
test=
"createdBy != null"
>
#{createdBy,jdbcType=BIGINT},
</if>
<if
test=
"updatedAt != null"
>
#{updatedAt,jdbcType=TIMESTAMP},
</if>
<if
test=
"updatedBy != null"
>
#{updatedBy,jdbcType=BIGINT},
</if>
</trim>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.yd.dal.entity.customer.AclInsurerBranch"
>
<!--@mbg.generated-->
update ag_acl_insurer_branch
<set>
<if
test=
"branchCode != null"
>
branch_code = #{branchCode,jdbcType=VARCHAR},
</if>
<if
test=
"insurerId != null"
>
insurer_id = #{insurerId,jdbcType=BIGINT},
</if>
<if
test=
"insurerName != null"
>
insurer_name = #{insurerName,jdbcType=VARCHAR},
</if>
<if
test=
"branchName != null"
>
branch_name = #{branchName,jdbcType=VARCHAR},
</if>
<if
test=
"isActive != null"
>
is_active = #{isActive,jdbcType=INTEGER},
</if>
<if
test=
"effectiveStartDate != null"
>
effective_start_date = #{effectiveStartDate,jdbcType=DATE},
</if>
<if
test=
"effectiveEndDate != null"
>
effective_end_date = #{effectiveEndDate,jdbcType=DATE},
</if>
<if
test=
"contactName != null"
>
contact_name = #{contactName,jdbcType=VARCHAR},
</if>
<if
test=
"contactNo != null"
>
contact_no = #{contactNo,jdbcType=VARCHAR},
</if>
<if
test=
"address != null"
>
address = #{address,jdbcType=VARCHAR},
</if>
<if
test=
"electronicTaxSeal != null"
>
electronic_tax_seal = #{electronicTaxSeal,jdbcType=VARCHAR},
</if>
<if
test=
"remark != null"
>
remark = #{remark,jdbcType=LONGVARCHAR},
</if>
<if
test=
"createdAt != null"
>
created_at = #{createdAt,jdbcType=TIMESTAMP},
</if>
<if
test=
"createdBy != null"
>
created_by = #{createdBy,jdbcType=BIGINT},
</if>
<if
test=
"updatedAt != null"
>
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
</if>
<if
test=
"updatedBy != null"
>
updated_by = #{updatedBy,jdbcType=BIGINT},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.yd.dal.entity.customer.AclInsurerBranch"
>
<!--@mbg.generated-->
update ag_acl_insurer_branch
set branch_code = #{branchCode,jdbcType=VARCHAR},
insurer_id = #{insurerId,jdbcType=BIGINT},
insurer_name = #{insurerName,jdbcType=VARCHAR},
branch_name = #{branchName,jdbcType=VARCHAR},
is_active = #{isActive,jdbcType=INTEGER},
effective_start_date = #{effectiveStartDate,jdbcType=DATE},
effective_end_date = #{effectiveEndDate,jdbcType=DATE},
contact_name = #{contactName,jdbcType=VARCHAR},
contact_no = #{contactNo,jdbcType=VARCHAR},
address = #{address,jdbcType=VARCHAR},
electronic_tax_seal = #{electronicTaxSeal,jdbcType=VARCHAR},
remark = #{remark,jdbcType=LONGVARCHAR},
created_at = #{createdAt,jdbcType=TIMESTAMP},
created_by = #{createdBy,jdbcType=BIGINT},
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
updated_by = #{updatedBy,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT}
</update>
<update
id=
"updateBatch"
parameterType=
"java.util.List"
>
<!--@mbg.generated-->
update ag_acl_insurer_branch
<trim
prefix=
"set"
suffixOverrides=
","
>
<trim
prefix=
"branch_code = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.branchCode,jdbcType=VARCHAR}
</foreach>
</trim>
<trim
prefix=
"insurer_id = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.insurerId,jdbcType=BIGINT}
</foreach>
</trim>
<trim
prefix=
"insurer_name = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.insurerName,jdbcType=VARCHAR}
</foreach>
</trim>
<trim
prefix=
"branch_name = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.branchName,jdbcType=VARCHAR}
</foreach>
</trim>
<trim
prefix=
"is_active = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.isActive,jdbcType=INTEGER}
</foreach>
</trim>
<trim
prefix=
"effective_start_date = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.effectiveStartDate,jdbcType=DATE}
</foreach>
</trim>
<trim
prefix=
"effective_end_date = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.effectiveEndDate,jdbcType=DATE}
</foreach>
</trim>
<trim
prefix=
"contact_name = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.contactName,jdbcType=VARCHAR}
</foreach>
</trim>
<trim
prefix=
"contact_no = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.contactNo,jdbcType=VARCHAR}
</foreach>
</trim>
<trim
prefix=
"address = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.address,jdbcType=VARCHAR}
</foreach>
</trim>
<trim
prefix=
"electronic_tax_seal = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.electronicTaxSeal,jdbcType=VARCHAR}
</foreach>
</trim>
<trim
prefix=
"remark = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.remark,jdbcType=LONGVARCHAR}
</foreach>
</trim>
<trim
prefix=
"created_at = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.createdAt,jdbcType=TIMESTAMP}
</foreach>
</trim>
<trim
prefix=
"created_by = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.createdBy,jdbcType=BIGINT}
</foreach>
</trim>
<trim
prefix=
"updated_at = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.updatedAt,jdbcType=TIMESTAMP}
</foreach>
</trim>
<trim
prefix=
"updated_by = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.updatedBy,jdbcType=BIGINT}
</foreach>
</trim>
</trim>
where id in
<foreach
close=
")"
collection=
"list"
item=
"item"
open=
"("
separator=
", "
>
#{item.id,jdbcType=BIGINT}
</foreach>
</update>
<update
id=
"updateBatchSelective"
parameterType=
"java.util.List"
>
<!--@mbg.generated-->
update ag_acl_insurer_branch
<trim
prefix=
"set"
suffixOverrides=
","
>
<trim
prefix=
"branch_code = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
<if
test=
"item.branchCode != null"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.branchCode,jdbcType=VARCHAR}
</if>
</foreach>
</trim>
<trim
prefix=
"insurer_id = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
<if
test=
"item.insurerId != null"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.insurerId,jdbcType=BIGINT}
</if>
</foreach>
</trim>
<trim
prefix=
"insurer_name = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
<if
test=
"item.insurerName != null"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.insurerName,jdbcType=VARCHAR}
</if>
</foreach>
</trim>
<trim
prefix=
"branch_name = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
<if
test=
"item.branchName != null"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.branchName,jdbcType=VARCHAR}
</if>
</foreach>
</trim>
<trim
prefix=
"is_active = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
<if
test=
"item.isActive != null"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.isActive,jdbcType=INTEGER}
</if>
</foreach>
</trim>
<trim
prefix=
"effective_start_date = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
<if
test=
"item.effectiveStartDate != null"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.effectiveStartDate,jdbcType=DATE}
</if>
</foreach>
</trim>
<trim
prefix=
"effective_end_date = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
<if
test=
"item.effectiveEndDate != null"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.effectiveEndDate,jdbcType=DATE}
</if>
</foreach>
</trim>
<trim
prefix=
"contact_name = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
<if
test=
"item.contactName != null"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.contactName,jdbcType=VARCHAR}
</if>
</foreach>
</trim>
<trim
prefix=
"contact_no = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
<if
test=
"item.contactNo != null"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.contactNo,jdbcType=VARCHAR}
</if>
</foreach>
</trim>
<trim
prefix=
"address = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
<if
test=
"item.address != null"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.address,jdbcType=VARCHAR}
</if>
</foreach>
</trim>
<trim
prefix=
"electronic_tax_seal = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
<if
test=
"item.electronicTaxSeal != null"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.electronicTaxSeal,jdbcType=VARCHAR}
</if>
</foreach>
</trim>
<trim
prefix=
"remark = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
<if
test=
"item.remark != null"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.remark,jdbcType=LONGVARCHAR}
</if>
</foreach>
</trim>
<trim
prefix=
"created_at = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
<if
test=
"item.createdAt != null"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.createdAt,jdbcType=TIMESTAMP}
</if>
</foreach>
</trim>
<trim
prefix=
"created_by = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
<if
test=
"item.createdBy != null"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.createdBy,jdbcType=BIGINT}
</if>
</foreach>
</trim>
<trim
prefix=
"updated_at = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
<if
test=
"item.updatedAt != null"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.updatedAt,jdbcType=TIMESTAMP}
</if>
</foreach>
</trim>
<trim
prefix=
"updated_by = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
<if
test=
"item.updatedBy != null"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.updatedBy,jdbcType=BIGINT}
</if>
</foreach>
</trim>
</trim>
where id in
<foreach
close=
")"
collection=
"list"
item=
"item"
open=
"("
separator=
", "
>
#{item.id,jdbcType=BIGINT}
</foreach>
</update>
<insert
id=
"batchInsert"
keyColumn=
"id"
keyProperty=
"id"
parameterType=
"map"
useGeneratedKeys=
"true"
>
<!--@mbg.generated-->
insert into ag_acl_insurer_branch
(branch_code, insurer_id, insurer_name, branch_name, is_active, effective_start_date,
effective_end_date, contact_name, contact_no, address, electronic_tax_seal, remark,
created_at, created_by, updated_at, updated_by)
values
<foreach
collection=
"list"
item=
"item"
separator=
","
>
(#{item.branchCode,jdbcType=VARCHAR}, #{item.insurerId,jdbcType=BIGINT}, #{item.insurerName,jdbcType=VARCHAR},
#{item.branchName,jdbcType=VARCHAR}, #{item.isActive,jdbcType=INTEGER}, #{item.effectiveStartDate,jdbcType=DATE},
#{item.effectiveEndDate,jdbcType=DATE}, #{item.contactName,jdbcType=VARCHAR}, #{item.contactNo,jdbcType=VARCHAR},
#{item.address,jdbcType=VARCHAR}, #{item.electronicTaxSeal,jdbcType=VARCHAR}, #{item.remark,jdbcType=LONGVARCHAR},
#{item.createdAt,jdbcType=TIMESTAMP}, #{item.createdBy,jdbcType=BIGINT}, #{item.updatedAt,jdbcType=TIMESTAMP},
#{item.updatedBy,jdbcType=BIGINT})
</foreach>
</insert>
</mapper>
\ No newline at end of file
yd-api/src/main/resources/pdfconfiguration.properties
View file @
5cad6c31
pdf.template
=
/opt/tomcat8/conf/ydpdf/pdfres/templatePractitionerContract.pdf
pdf.template
=
/opt/tomcat8/conf/ydpdf/pdfres/templatePractitionerContract.pdf
pdf.signImage
=
/opt/tomcat8/conf/ydpdf/pdfres/
yindunsign.png
pdf.signImage
=
/opt/tomcat8/conf/ydpdf/pdfres/
pdf.keyStorePath
=
/opt/tomcat8/conf/ydpdf/pdfres/4929078_m.zuihuibi.cn.pfx
pdf.keyStorePath
=
/opt/tomcat8/conf/ydpdf/pdfres/4929078_m.zuihuibi.cn.pfx
pdf.keyPassword
=
UC645YlB
pdf.keyPassword
=
UC645YlB
...
...
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