Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
A
Aidea
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
sa_aidea
Aidea
Commits
0126d2cf
Commit
0126d2cf
authored
Jan 25, 2021
by
谢希宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Aidea product update by Strive Date 2020-01-25 增加检测券模块
parent
8e51c33d
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
80 additions
and
374 deletions
+80
-374
consultSheetlist.html
...n/webapp/WEB-INF/views/consultSheet/consultSheetlist.html
+0
-1
ConsultSheetServiceImpl.java
...ch/consultsheet/service/impl/ConsultSheetServiceImpl.java
+5
-1
ConsultSheetMapper.xml
...lasses/com/cftech/consultsheet/dao/ConsultSheetMapper.xml
+0
-370
InitAliasNumberJob.java
...rc/main/java/com/cftech/order/job/InitAliasNumberJob.java
+66
-0
pom.xml
aidea-modules/pom.xml
+2
-1
pom.xml
portal-web/pom.xml
+6
-0
QyUserUtil.java
...ule/src/main/java/com/cftech/base/org/api/QyUserUtil.java
+1
-1
No files found.
aidea-modules/consult-module-web/src/main/webapp/WEB-INF/views/consultSheet/consultSheetlist.html
View file @
0126d2cf
...
...
@@ -269,7 +269,6 @@
"pagingType"
:
"full_numbers"
,
"autowidth"
:
true
,
"scrollX"
:
true
,
"sScrollY"
:
"480px"
,
"aoColumns"
:
[
{
"mData"
:
"id"
...
...
aidea-modules/consult-module/src/main/java/com/cftech/consultsheet/service/impl/ConsultSheetServiceImpl.java
View file @
0126d2cf
...
...
@@ -25,6 +25,7 @@ import com.cftech.core.util.SystemConfig;
import
com.cftech.member.service.MemberService
;
import
com.cftech.order.model.Order
;
import
com.cftech.order.service.OrderService
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Qualifier
;
import
org.springframework.stereotype.Service
;
...
...
@@ -40,6 +41,7 @@ import java.util.Map;
* @author Licc
* @date: 2020-09-22 12:06
*/
@Slf4j
@Service
(
"consultSheetService"
)
public
class
ConsultSheetServiceImpl
extends
GenericServiceImpl
<
ConsultSheet
>
implements
ConsultSheetService
{
...
...
@@ -319,8 +321,9 @@ public class ConsultSheetServiceImpl extends GenericServiceImpl<ConsultSheet> im
msg
=
SystemConfig
.
p
.
getProperty
(
"QY_SEND_CUSTOMERSERVICE_MSG"
)
+
consultSheet
.
getConsultId
();
List
<
Qyuser
>
serviceUsers
=
new
ArrayList
();
serviceUsers
.
add
(
service
);
qyMsgUtil
.
sendText
(
accounts
,
false
,
serviceUsers
,
null
,
null
,
JSONObject
result
=
qyMsgUtil
.
sendText
(
accounts
,
false
,
serviceUsers
,
null
,
null
,
agenId
,
msg
,
false
);
log
.
info
(
"客服,消息发送日志 {}"
,
result
.
toString
());
Qyuser
doctor
=
qyuserService
.
fetchById
(
consultSheet
.
getDoctorId
());
msg
=
SystemConfig
.
p
.
getProperty
(
"QY_SEND_DOCTOR_MSG"
)
+
consultSheet
.
getConsultId
();
...
...
@@ -328,6 +331,7 @@ public class ConsultSheetServiceImpl extends GenericServiceImpl<ConsultSheet> im
doctorUsers
.
add
(
doctor
);
qyMsgUtil
.
sendText
(
accounts
,
false
,
doctorUsers
,
null
,
null
,
agenId
,
msg
,
false
);
log
.
info
(
"医生,消息发送日志 {}"
,
result
.
toString
());
}
}
\ No newline at end of file
aidea-modules/consult-module/target/classes/com/cftech/consultsheet/dao/ConsultSheetMapper.xml
deleted
100644 → 0
View file @
8e51c33d
<?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.cftech.consultsheet.dao.ConsultSheetMapper"
>
<resultMap
id=
"resultMap"
type=
"com.cftech.consultsheet.model.ConsultSheet"
>
<id
column=
"id"
property=
"id"
/>
<result
column=
"consult_id"
property=
"consultId"
/>
<result
column=
"user_name"
property=
"userName"
/>
<result
column=
"number_id"
property=
"numberId"
/>
<result
column=
"sex"
property=
"sex"
/>
<result
column=
"phone"
property=
"phone"
/>
<result
column=
"past_records"
property=
"pastRecords"
/>
<result
column=
"prescription"
property=
"prescription"
/>
<result
column=
"doctor_id"
property=
"doctorId"
/>
<result
column=
"service_id"
property=
"serviceId"
/>
<result
column=
"illness"
property=
"illness"
/>
<result
column=
"accounts_id"
property=
"accountsId"
/>
<result
column=
"del_flag"
property=
"delFlag"
/>
<result
column=
"status"
property=
"status"
/>
<result
column=
"create_time"
property=
"createTime"
/>
<result
column=
"update_time"
property=
"updateTime"
/>
<result
column=
"description"
property=
"description"
/>
<result
column=
"create_by"
property=
"createBy"
/>
<result
column=
"update_by"
property=
"updateBy"
/>
<result
column=
"allergy"
property=
"allergy"
/>
<result
column=
"symptom"
property=
"symptom"
/>
<result
column=
"diagnosis"
property=
"diagnosis"
/>
<result
column=
"open_id"
property=
"openId"
></result>
<result
column=
"drugs_id"
property=
"drugsId"
></result>
<result
column=
"member_id"
property=
"memberId"
></result>
<result
column=
"order_id"
property=
"orderId"
></result>
<result
column=
"address_id"
property=
"addressId"
></result>
<result
column=
"audit_time"
property=
"auditTime"
></result>
</resultMap>
<sql
id=
"sqlWhere"
>
<if
test=
"conds!=null"
>
<trim
prefix=
"WHERE"
prefixOverrides=
"AND|OR"
>
<foreach
collection=
"conds.conds"
index=
"index"
item=
"cond"
>
${cond.linkType}
<if
test=
"cond.condType == 'EQUAL'"
>
${cond.param} = #{cond.value}
</if>
<if
test=
"cond.condType == 'NOTEQUAL'"
>
${cond.param}
<>
#{cond.value}
</if>
<if
test=
"cond.condType == 'GREATEQUAL'"
>
${cond.param}
>
= #{cond.value}
</if>
<if
test=
"cond.condType == 'GREATTHAN'"
>
${cond.param}
>
#{cond.value}
</if>
<if
test=
"cond.condType == 'LESSEQUAL'"
>
${cond.param}
<
= #{cond.value}
</if>
<if
test=
"cond.condType == 'LESSTHAN'"
>
${cond.param}
<
#{cond.value}
</if>
<if
test=
"cond.condType == 'BETWEEN'"
>
${cond.param} BETWEEN #{cond.startValue} AND
#{cond.endValue}
</if>
<if
test=
"cond.condType == 'ISNULL'"
>
${cond.param} IS NULL
</if>
<if
test=
"cond.condType == 'NOTNULL'"
>
${cond.param} IS NOT NULL
</if>
<if
test=
"cond.condType == 'LIKE'"
>
${cond.param} LIKE #{cond.value}
</if>
<if
test=
"cond.condType == 'IN'"
>
${cond.param} IN
<foreach
item=
"item"
index=
"index"
collection=
"cond.value"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</if>
</foreach>
</trim>
</if>
</sql>
<sql
id=
"sqlColumns"
>
a.id,
a.consult_id,
CONVERT(AES_DECRYPT(a.user_name,'aideakey') USING UTF8) userName,
a.number_id numberId,
a.sex,
CONVERT(AES_DECRYPT(a.phone,'aideakey') USING UTF8) phone,
a.past_records pastRecords,
a.prescription,
a.doctor_id doctorId,
a.service_id serviceId,
a.illness,
a.accounts_id accountsId,
a.del_flag delFlag,
a.status,
a.create_time createTime,
a.update_time updateTime,
a.description,
a.create_by createBy,
a.update_by updateBy,
a.allergy,
a.symptom,
a.diagnosis,
a.open_id openId,
a.drugs_id drugsId,
a.member_id memberId,
a.order_id orderId,
a.address_id addressId,
a.audit_time auditTime,
b.`name` pharmaName,
c.`name` customerName
</sql>
<sql
id=
"sqlCol"
>
id,
CONVERT(AES_DECRYPT(user_name,'aideakey') USING UTF8) userName,
sex,
CONVERT(AES_DECRYPT(phone,'aideakey') USING UTF8) phone,
past_records,
prescription,
illness,
accounts_id,
STATUS,
create_time,
description,
allergy,
symptom,
open_id,
consult_id consultId,
status,
drugs_id drugsId,
address_id addressId
</sql>
<insert
id=
"save"
parameterType=
"com.cftech.consultsheet.model.ConsultSheet"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into t_aidea_consult_sheet
(
id,
consult_id,
user_name ,
number_id,
sex,
phone,
past_records,
prescription,
doctor_id,
service_id,
illness,
accounts_id,
del_flag,
STATUS,
create_time,
update_time,
description,
create_by,
update_by,
allergy,
symptom,
diagnosis,
open_id,
drugs_id,
member_id,
order_id,
address_id,
audit_time
)
values
(
#{id, jdbcType=BIGINT},
#{consultId, jdbcType=VARCHAR},
AES_ENCRYPT(#{userName, jdbcType=VARBINARY},'aideakey'),
#{numberId, jdbcType=VARCHAR},
#{sex, jdbcType=BIGINT},
AES_ENCRYPT(#{phone, jdbcType=VARBINARY},'aideakey'),
#{pastRecords, jdbcType=VARCHAR},
#{prescription, jdbcType=VARCHAR},
#{doctorId, jdbcType=BIGINT},
#{serviceId, jdbcType=BIGINT},
#{illness, jdbcType=VARCHAR},
#{accountsId, jdbcType=BIGINT},
#{delFlag, jdbcType=TINYINT},
#{status, jdbcType=VARCHAR},
now(),
now(),
#{description, jdbcType=VARCHAR},
#{createBy, jdbcType=BIGINT},
#{updateBy, jdbcType=BIGINT},
#{allergy, jdbcType=VARCHAR},
#{symptom, jdbcType=VARCHAR},
#{diagnosis, jdbcType=BIGINT},
#{openId, jdbcType=VARCHAR},
#{drugsId, jdbcType=BIGINT},
#{memberId, jdbcType=BIGINT},
#{orderId, jdbcType=BIGINT},
#{addressId, jdbcType=VARCHAR},
#{auditTime, jdbcType=TIMESTAMP}
)
</insert>
<select
id=
"fetchById"
parameterType=
"java.lang.Long"
resultType=
"com.cftech.consultsheet.model.ConsultSheet"
>
SELECT
<include
refid=
"sqlColumns"
/>
, d.name pharmacist, e.org_name hospital, f.store fansAlias, CONVERT(AES_DECRYPT(f.nickname,'aideakey') USING UTF8) nickName
FROM t_aidea_consult_sheet a
LEFT JOIN t_qyuser b ON b.id = a.doctor_id
LEFT JOIN t_qyuser c ON c.id = a.service_id
LEFT JOIN t_qyuser d ON d.id = a.past_records
LEFT JOIN t_orgunit e ON e.id = a.allergy
LEFT JOIN wx_mp_fanss f ON f.openid = a.open_id AND f.delflag = 0
WHERE a.id = #{id}
GROUP BY id
</select>
<select
id=
"count"
parameterType=
"java.util.Map"
resultType=
"java.lang.Integer"
>
SELECT COUNT(1) FROM t_aidea_consult_sheet a
LEFT JOIN t_qyuser b ON b.id = a.doctor_id
LEFT JOIN t_qyuser c ON c.id = a.service_id
LEFT JOIN `user` u ON u.userid = b.id
<include
refid=
"sqlWhere"
/>
</select>
<select
id=
"fetchSearchByCount"
parameterType=
"java.util.Map"
resultType=
"java.lang.Integer"
>
SELECT COUNT(1) FROM t_aidea_consult_sheet a
LEFT JOIN t_order o ON a.order_id = o.id
LEFT JOIN t_qyuser b ON b.id = a.doctor_id AND b.del_flag = '0'
LEFT JOIN t_qyuser c ON c.id = a.service_id AND c.del_flag = '0'
LEFT JOIN wx_mp_member m ON m.open_id = a.open_id AND m.del_flag = '0'
LEFT JOIN t_aidea_authentication au ON m.cardid = au.id_card AND au.del_flag = '0'
<include
refid=
"sqlWhere"
/>
<if
test=
"id!=null"
>
and (a.doctor_id = ${id} or a.service_id =${id} )
</if>
</select>
<select
id=
"fetchSearchByPage"
parameterType=
"java.util.Map"
resultType=
"com.cftech.consultsheet.model.ConsultSheet"
>
SELECT
<include
refid=
"sqlColumns"
/>
, o.number orderCode, CASE WHEN au.name IS NOT NULL THEN 1 ELSE 0 END isThree
FROM t_aidea_consult_sheet a
LEFT JOIN t_order o ON a.order_id = o.id
LEFT JOIN t_qyuser b ON b.id = a.doctor_id AND b.del_flag = '0'
LEFT JOIN t_qyuser c ON c.id = a.service_id AND c.del_flag = '0'
LEFT JOIN wx_mp_member m ON m.open_id = a.open_id AND m.del_flag = '0'
LEFT JOIN t_aidea_authentication au ON m.cardid = au.id_card AND au.del_flag = '0'
<include
refid=
"sqlWhere"
/>
<if
test=
"id!=null"
>
AND (a.doctor_id = ${id} or a.service_id =${id})
</if>
<if
test=
"sort!=null"
>
ORDER BY ${sort.param} ${sort.type}
</if>
<if
test=
"limit>0"
>
limit #{offset},#{limit}
</if>
</select>
<select
id=
"consultSheetList"
resultType=
"com.cftech.consultsheet.model.ConsultSheet"
>
SELECT
<include
refid=
"sqlCol"
/>
from t_aidea_consult_sheet
where del_flag = 0
<if
test=
"openid!=null"
>
and open_id = #{openid}
</if>
<if
test=
"name!=null and name !=''"
>
and (CONVERT(AES_DECRYPT(user_name,'aideakey') USING UTF8) like concat('%',#{name},'%') OR consult_id like concat('%',#{name},'%'))
</if>
<if
test=
"id!=null"
>
and id = #{id}
</if>
ORDER BY create_time DESC
<if
test=
"page!=null and pageSize !='' and pageSize!=null and page !=''"
>
limit #{page}, #{pageSize}
</if>
</select>
<update
id=
"update"
parameterType=
"com.cftech.consultsheet.model.ConsultSheet"
>
update t_aidea_consult_sheet
<set>
<if
test=
"id != null"
>
id = #{id, jdbcType=BIGINT},
</if>
<if
test=
"consultId != null"
>
consult_id = #{consultId, jdbcType=VARCHAR},
</if>
<if
test=
"userName != null"
>
user_name = AES_ENCRYPT(#{userName, jdbcType=VARBINARY},'aideakey'),
</if>
<if
test=
"numberId != null"
>
number_id = #{numberId, jdbcType=VARCHAR},
</if>
<if
test=
"sex != null"
>
sex = #{sex, jdbcType=BIGINT},
</if>
<if
test=
"phone != null"
>
phone = AES_ENCRYPT(#{phone, jdbcType=VARBINARY},'aideakey'),
</if>
<if
test=
"pastRecords != null"
>
past_records = #{pastRecords, jdbcType=VARCHAR},
</if>
<if
test=
"prescription != null"
>
prescription = #{prescription, jdbcType=VARCHAR},
</if>
<if
test=
"doctorId != null"
>
doctor_id = #{doctorId, jdbcType=BIGINT},
</if>
<if
test=
"serviceId != null"
>
service_id = #{serviceId, jdbcType=BIGINT},
</if>
<if
test=
"illness != null"
>
illness = #{illness, jdbcType=VARCHAR},
</if>
<if
test=
"accountsId != null"
>
accounts_id = #{accountsId, jdbcType=BIGINT},
</if>
<if
test=
"delFlag != null"
>
del_flag = #{delFlag, jdbcType=TINYINT},
</if>
<if
test=
"status != null"
>
status = #{status, jdbcType=VARCHAR},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime, jdbcType=TIMESTAMP},
</if>
<if
test=
"description != null"
>
description = #{description, jdbcType=VARCHAR},
</if>
<if
test=
"createBy != null"
>
create_by = #{createBy, jdbcType=BIGINT},
</if>
<if
test=
"updateBy != null"
>
update_by = #{updateBy, jdbcType=BIGINT},
</if>
<if
test=
"allergy != null"
>
allergy = #{allergy, jdbcType=VARCHAR},
</if>
<if
test=
"symptom != null"
>
symptom = #{symptom, jdbcType=VARCHAR},
</if>
<if
test=
"diagnosis != null"
>
diagnosis = #{diagnosis, jdbcType=BIGINT},
</if>
<if
test=
"openId != null"
>
open_id = #{openId, jdbcType=VARCHAR},
</if>
<if
test=
"openId != null"
>
drugs_id = #{drugsId, jdbcType=BIGINT},
</if>
<if
test=
"openId != null"
>
member_id = #{memberId, jdbcType=BIGINT},
</if>
<if
test=
"openId != null"
>
order_id = #{orderId, jdbcType=BIGINT},
</if>
<if
test=
"addressId != null"
>
address_id = #{addressId, jdbcType=BIGINT},
</if>
<if
test=
"auditTime != null"
>
audit_time = #{auditTime, jdbcType=TIMESTAMP},
</if>
</set>
where id=#{id,jdbcType=BIGINT}
</update>
<update
id=
"delete"
parameterType=
"java.lang.Long"
>
update t_aidea_consult_sheet set del_flag=1 where id=#{id,jdbcType=BIGINT}
</update>
<update
id=
"updateDate"
>
update t_aidea_consult_sheet
<set>
<if
test=
"status !=null"
>
status = #{status},
</if>
<if
test=
"description !=null"
>
description = #{description},
</if>
audit_time = now()
</set>
where id = #{consultId}
</update>
<update
id=
"updateStatus"
>
update t_aidea_consult_sheet
<set>
<if
test=
"status !=null"
>
status = #{status},
</if>
<if
test=
"des !=null and des != ''"
>
symptom = #{des},
</if>
audit_time = now()
</set>
where id = #{consultId}
</update>
</mapper>
aidea-modules/order-module/src/main/java/com/cftech/order/job/InitAliasNumberJob.java
0 → 100644
View file @
0126d2cf
package
com
.
cftech
.
order
.
job
;
import
com.cftech.accounts.model.SysJob
;
import
com.cftech.accounts.service.JobService
;
import
com.cftech.accounts.service.JobTask
;
import
com.cftech.accounts.service.RedisSubPubListener
;
import
com.cftech.base.codingrule.service.CodingruleService
;
import
com.cftech.core.sql.Conds
;
import
com.cftech.core.util.DESUtil
;
import
com.cftech.core.util.SpringContextHolder
;
import
com.cftech.core.util.SystemConfig
;
import
lombok.extern.slf4j.Slf4j
;
import
org.quartz.Job
;
import
org.quartz.JobDataMap
;
import
org.quartz.JobExecutionContext
;
import
org.quartz.JobExecutionException
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.data.redis.serializer.StringRedisSerializer
;
import
org.springframework.stereotype.Component
;
import
org.springframework.transaction.annotation.Transactional
;
import
redis.clients.jedis.Jedis
;
import
redis.clients.jedis.JedisPool
;
import
java.text.SimpleDateFormat
;
import
java.util.List
;
/**
* Created by 16444 on 2021/1/4.
*/
@Slf4j
public
class
InitAliasNumberJob
implements
Job
{
@Override
public
void
execute
(
JobExecutionContext
context
)
throws
JobExecutionException
{
boolean
isCluster
=
Boolean
.
valueOf
(
SystemConfig
.
p
.
getProperty
(
"quartz.isCluster"
));
if
(!
isCluster
)
{
return
;
}
//获得明细数据
JobDataMap
jobInfo
=
context
.
getJobDetail
().
getJobDataMap
();
String
id
=
jobInfo
.
get
(
"uid"
)
==
null
?
""
:
jobInfo
.
getString
(
"uid"
);
//这个也是ID主键
log
.
info
(
"任务ID:"
+
id
);
JobService
jobService
=
SpringContextHolder
.
getBean
(
JobService
.
class
);
Conds
conds
=
new
Conds
();
conds
.
equal
(
"clazz_path"
,
"com.cftech.order.job.InitAliasNumberJob"
);
conds
.
equal
(
"del_flag"
,
0
);
SysJob
job
=
jobService
.
fetchSearchByConds
(
conds
);
job
.
setDescription
(
"1"
);
//重置别名
jobService
.
update
(
job
);
//执行更新操作
if
(
context
.
getNextFireTime
()
!=
null
)
{
log
.
info
(
"初始化别名key任务:下次执行时间====="
+
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
).
format
(
context
.
getNextFireTime
())
+
"=============="
);
}
else
{
SysJob
sysJob
=
new
SysJob
();
sysJob
.
setJobuid
(
id
);
sysJob
.
setStatus
(
"0"
);
jobService
.
updateStatus
(
sysJob
);
log
.
info
(
"初始化别名key任务,已执行完成!"
);
}
}
}
aidea-modules/pom.xml
View file @
0126d2cf
...
...
@@ -38,7 +38,8 @@
<module>
logistics-module-web
</module>
<module>
msgrecord-module
</module>
<module>
msgrecord-module-web
</module>
<module>
checkcoupon-module
</module>
<module>
checkcoupon-module-web
</module>
</modules>
<dependencies>
...
...
portal-web/pom.xml
View file @
0126d2cf
...
...
@@ -322,6 +322,12 @@
<version>
1.0-SNAPSHOT
</version>
<type>
war
</type>
</dependency>
<dependency>
<groupId>
com.cftech
</groupId>
<artifactId>
checkcoupon-module-web
</artifactId>
<version>
1.0-SNAPSHOT
</version>
<type>
war
</type>
</dependency>
</dependencies>
<build>
<finalName>
portal-web
</finalName>
...
...
qy-modules/qy-orgunit-module/src/main/java/com/cftech/base/org/api/QyUserUtil.java
View file @
0126d2cf
...
...
@@ -118,7 +118,7 @@ public class QyUserUtil {
if
(!
StringUtils
.
isEmpty
(
qyuser
.
getWxno
()))
postObj
.
put
(
"weixinid"
,
qyuser
.
getWxno
());
Position
position
=
positionService
.
fetchById
(
qyuser
.
getId
());
Position
position
=
positionService
.
fetchById
(
qyuser
.
get
Position
Id
());
if
(
position
!=
null
)
{
postObj
.
put
(
"position"
,
position
.
getName
());
}
...
...
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