Commit 85cba2f2 authored by 黎聪聪's avatar 黎聪聪

咨询单管理

parent ac37690f
......@@ -78,11 +78,19 @@
<div class="box-header">
<form id="seachTableForm" action="#springUrl('/a/consultSheet/list')" method="get">
<div class="col-xs-5">
<button type="button" class="search btn btn-primary">搜索</button>
<div class="col-xs-2">
<input type="text" class="form-control required"
name="doctorName" placeholder="用药人姓名">
</div>
<div class="col-xs-2">
<input type="text" class="form-control required"
name="illness" placeholder="病情描述">
</div>
<a href="javascript:void(0)" class="btn btn-primary search">搜索</a>
#if($shiro.hasPermission("qy:consultSheet:edit"))
<a href="#springUrl('/a/consultSheet/form')" class="btn btn-primary">新增</a>
<a href="#springUrl('/a/consultSheet/exportExcel')" class="btn btn-primary">导出</a>
<a onclick="importExcel();" class="btn btn-primary">导入</a>
#end
</div>
</form>
......@@ -91,9 +99,22 @@
<table id="table" class="table table-bordered table-striped">
<thead>
<tr>
<td hidden="true">Id</td><th>创建时间</th>
<td hidden="true">Id</td>
<th>咨询单编码</th>
<th>用药人姓名</th>
<th>性别</th>
<th>联系电话</th>
<th>疾病史</th>
<th>处方单图片</th>
<th>病情描述</th>
<th>过敏史</th>
<th>药师姓名</th>
<th>客服姓名</th>
<th>审核状态</th>
<th>备注(审核未通过原因)</th>
<th>操作</th>
</tr>
</thead>
<tbody id="tablebody">
</tbody>
......@@ -150,6 +171,7 @@
function seachTable() {
var sSource = "#springUrl('/a/consultSheet/listData')";
var aoData = {
iDisplayStart: 1,
iDosplayLength: 10
......@@ -173,6 +195,7 @@
});
};
$('#table').DataTable({
"lengthChange": false,
"searching": false,
......@@ -189,11 +212,46 @@
"mData": "id"
},
{
"mData": "createTime"
"mData": "consultId"
},
{
"mData": "userName"
},
{
"mData": "sex"
},
{
"mData": "iphone"
},
{
"mData": "pastRecords"
},
{
"mData": "prescription"
},
{
"mData": "illness"
},
{
"mData": "allergy"
},
{
"mData": "doctorName"
},
{
"mData": "customerName"
},
{
"mData": "status"
},
{
"mData": "description"
},
{
"mData": "id"
}],
}
],
"aoColumnDefs": [
{ // set default column settings
'visible': false,
......@@ -202,14 +260,121 @@
{
"aTargets": [1],
"mData": "createTime",
"mData": "consultId",
"mRender": function (a, b, c, d) {
return a;
}
},
{
"aTargets": [2],
"mData": "userName",
"mRender": function (a, b, c, d) {
return a;
}
},
{
"aTargets": [3],
"mData": "sex",
"mRender": function (a, b, c, d) {
return '<a href="#springUrl("/a/consultSheet/form?id=' + c.id + '")" data-id="' + c.id + '" data-action="view">' + formatDates(a, "yyyy-MM-dd HH:mm:ss");
+'</a>';
if (a==0){
return "女";
}else{
return "男";
}
}
},
{
"aTargets": [4],
"mData": "iphone",
"mRender": function (a, b, c, d) {
return a;
}
},
{
"aTargets": [5],
"mData": "pastRecords",
"mRender": function (a, b, c, d) {
return a;
}
},
{
"aTargets": [6],
"mData": "prescription",
"mRender": function (a, b, c, d) {
var html =""
html+='<img style="width: 50px;height: auto" src="'+a+'"">'
return html;
}
},
{
"aTargets": [7],
"mData": "illness",
"mRender": function (a, b, c, d) {
return a;
}
},
{
"aTargets": [8],
"mData": "allergy",
"mRender": function (a, b, c, d) {
return a;
}
},
{
"aTargets": [9],
"mData": "doctorName",
"mRender": function (a, b, c, d) {
return a;
}
},
{
"aTargets": [10],
"mData": "customerName",
"mRender": function (a, b, c, d) {
return a;
}
},
{
"aTargets": [11],
"mData": "status",
"mRender": function (a, b, c, d) {
if (a==0){
return "待审核";
}else if(a==1){
return "已通过";
}else if(a==2){
return "已拒绝";
}
}
},
{
"aTargets": [12],
"mData": "description",
"mRender": function (a, b, c, d) {
return a;
}
},
{
"aTargets": [13],
"mData": "id",
"mRender": function (a, b, c, d) {
var object = c.status;
var html = '';
if (object==0 ){
html += '#if($shiro.hasPermission("qy:consultSheet:edit"))<a href="#springUrl("/a/consultSheet/form?id=' + a + '")" class="btn green">审核</a>#end';
}else{
html += '#if($shiro.hasPermission("qy:consultSheet:view"))<a href="#springUrl("/a/consultSheet/form?id=' + a + '")" class="btn green">查看</a> #end';
}
return html
}
}
]
});
}
......@@ -231,6 +396,7 @@
});
Cfapp.init();
function removeData(data) {
Cfapp.confirm({
message: "确定要删除吗",
......@@ -262,6 +428,7 @@
}
});
}
function importExcel() {
var templateExcelUrl = "#springUrl('/a/consultSheet/templateExcel')";
var importExcelUrl = "#springUrl('/a/consultSheet/importExcel')";
......
<!DOCTYPE web-app PUBLIC
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd" >
<web-app>
<display-name>Archetype Created Web Application</display-name>
</web-app>
<html>
<body>
<h2>Hello World!</h2>
</body>
</html>
package com.cftech.consultsheet.dao;
import com.alibaba.fastjson.JSONObject;
import com.cftech.consultsheet.model.ConsultSheet;
import com.cftech.core.generic.GenericDao;
......@@ -11,5 +12,7 @@ import com.cftech.core.generic.GenericDao;
* @date: 2020-09-22 12:06
*/
public interface ConsultSheetMapper extends GenericDao<ConsultSheet> {
JSONObject updateDate(int consultId, String status, String description);
JSONObject updateStatus(ConsultSheet consultSheet);
}
\ No newline at end of file
......@@ -23,6 +23,11 @@
<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="doctor_name" property="doctorName"/>
<result column="customer_name" property="customerName"/>
</resultMap>
<sql id="sqlWhere">
......@@ -53,6 +58,34 @@
</sql>
<sql id="sqlColumns">
aidea.id,
aidea.consult_id,
aidea.user_name,
aidea.number_id,
aidea.benebit_id,
aidea.sex,
aidea.iphone,
aidea.past_records,
aidea.prescription,
aidea.doctor_id,
aidea.customer_id,
aidea.illness,
aidea.accounts_id,
aidea.del_flag,
aidea.status,
aidea.create_time,
aidea.update_time,
aidea.description,
aidea.create_by,
aidea.update_by,
aidea.allergy,
aidea.symptom,
aidea.diagnosis,
USER.doctor_name,
USER.customer_name
</sql>
<sql id="sqlColumn">
id,
consult_id,
user_name,
......@@ -72,15 +105,18 @@
update_time,
description,
create_by,
update_by
</sql>
update_by,
allergy,
symptom,
diagnosis,
</sql>
<insert id="save" parameterType="com.cftech.consultsheet.model.ConsultSheet" useGeneratedKeys="true"
keyProperty="id">
insert into t_aidea_consult_sheet
(
<include refid="sqlColumns"/>
<include refid="sqlColumn"/>
)
values
(
......@@ -104,19 +140,26 @@
now(),
#{description, jdbcType=VARCHAR},
#{createBy, jdbcType=BIGINT},
#{updateBy, jdbcType=BIGINT}
#{updateBy, jdbcType=BIGINT},
#{allergy, jdbcType=VARCHAR},
#{updateBy, jdbcType=VARCHAR},
#{diagnosis,jdbcType=BIGINT}
#{doctorName, jdbcType=VARCHAR},
#{customerName,jdbcType=BIGINT}
)
</insert>
<select id="fetchById" parameterType="java.lang.Long" resultMap="resultMap">
SELECT
<include refid="sqlColumns"/>
FROM t_aidea_consult_sheet t
WHERE t.id=#{id}
FROM t_aidea_consult_sheet aidea LEFT JOIN t_qyuser USER ON aidea.doctor_id = USER.doctor_id AND
aidea.customer_id = USER.customer_id
WHERE aidea.id=#{id}
</select>
<select id="count" parameterType="java.util.Map" resultType="java.lang.Integer">
SELECT COUNT(1) FROM t_aidea_consult_sheet
SELECT COUNT(1) FROM t_aidea_consult_sheet aidea LEFT JOIN t_qyuser USER ON aidea.doctor_id = USER.doctor_id AND
aidea.customer_id = USER.customer_id
<include refid="sqlWhere"/>
</select>
......@@ -124,7 +167,9 @@
<select id="fetchSearchByPage" parameterType="java.util.Map" resultMap="resultMap">
SELECT
<include refid="sqlColumns"/>
FROM t_aidea_consult_sheet
FROM t_aidea_consult_sheet aidea
LEFT JOIN t_qyuser USER ON aidea.doctor_id = USER.doctor_id AND
aidea.customer_id = USER.customer_id
<include refid="sqlWhere"/>
<if test="sort!=null">ORDER BY ${sort.param} ${sort.type}</if>
<if test="limit>0">limit #{offset},#{limit}</if>
......@@ -153,7 +198,7 @@
sex = #{sex, jdbcType=BIGINT},
</if>
<if test="iPhone != null">
i_phone = #{iPhone, jdbcType=VARCHAR},
iphone = #{iPhone, jdbcType=VARCHAR},
</if>
<if test="pastRecords != null">
past_records = #{pastRecords, jdbcType=VARCHAR},
......@@ -191,6 +236,15 @@
<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>
</set>
where id=#{id,jdbcType=BIGINT}
</update>
......@@ -198,4 +252,6 @@
<update id="delete" parameterType="java.lang.Long">
update t_aidea_consult_sheet set del_flag=1 where id=#{id,jdbcType=BIGINT}
</update>
</mapper>
package com.cftech.consultsheet.model;
import com.alibaba.fastjson.annotation.JSONField;
import com.cftech.core.poi.ExportConfig;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.Data;
import org.codehaus.jackson.format.DataFormatMatcher;
import java.io.Serializable;
import java.util.Date;
......@@ -13,29 +17,31 @@ import java.util.Date;
* @date: 2020-09-22 12:06
*/
@Data
public class ConsultSheet implements Serializable {
public class ConsultSheet extends UserSheet implements Serializable {
/* 主键id */
/* 主键id */
private Long id;
/* 咨询单编码 */
@ExportConfig(value = "咨询单编码", width = 100, showLevel = 1)
private Long consultId;
/* 用药人name */
@ExportConfig(value = "用药人name", width = 100, showLevel = 1)
@ExportConfig(value = "用药人姓名", width = 100, showLevel = 1)
private String userName;
/* 身份证号 */
@ExportConfig(value = "身份证号", width = 100, showLevel = 1)
private String numberId;
/* 出生年月 */
@ExportConfig(value = "出生年月", width = 100, showLevel = 1)
@JSONField(format="yyyy-MM-dd")
private Date benebitId;
/* 性别 */
@ExportConfig(value = "性别", width = 100, showLevel = 1)
private Long sex;
/* 手机号 */
@ExportConfig(value = "手机号", width = 100, showLevel = 1)
private String iPhone;
@ExportConfig(value = "联系电话", width = 100, showLevel = 1)
private Long iPhone;
/* 疾病史 */
@ExportConfig(value = "疾病史", width = 100, showLevel = 1)
private String pastRecords;
......@@ -43,19 +49,27 @@ public class ConsultSheet implements Serializable {
@ExportConfig(value = "处方单", width = 100, showLevel = 1)
private String Prescription;
/* 药师id */
@ExportConfig(value = "药师id", width = 100, showLevel = 1)
private Long doctorId;
/* 客服id */
@ExportConfig(value = "客服id", width = 100, showLevel = 1)
private Long customerId;
/* 病情描述 */
@ExportConfig(value = "病情描述", width = 100, showLevel = 1)
private Long illness;
private String illness;
/* 过敏史 */
@ExportConfig(value = "过敏史", width = 100, showLevel = 1)
private String allergy;
/* 本次确认症状 */
private String symptom;
/*是否已在医院确诊*/
private Long diagnosis;
/* 所属的账号 */
private Long accountsId;
/* 删除标识 */
private boolean delFlag;
/* 状态 */
@ExportConfig(value = "是否审核", width = 100, showLevel = 1)
private String status;
/* 创建时间 */
private Date createTime;
......@@ -68,6 +82,8 @@ public class ConsultSheet implements Serializable {
/* 更新人 */
private Long updateBy;
public ConsultSheet() {
this.delFlag = false;
this.status = "0";
......
package com.cftech.consultsheet.model;
import com.cftech.core.poi.ExportConfig;
import lombok.Data;
import java.util.Date;
/**
* @author :licc
* @date :Created in 2020/9/23 20:56
* @description:
*/
@Data
public class ConsultSheetVO {
/* 咨询单编码 */
@ExportConfig(value = "咨询单编码", width = 100, showLevel = 1)
private Long consultId;
/* 用药人name */
@ExportConfig(value = "用药人姓名", width = 100, showLevel = 1)
private String userName;
/* 性别 */
@ExportConfig(value = "性别", width = 100, showLevel = 1)
private String sex;
/* 手机号 */
@ExportConfig(value = "联系电话", width = 100, showLevel = 1)
private Long phone;
/* 疾病史 */
@ExportConfig(value = "疾病史", width = 100, showLevel = 1)
private String pastRecords;
/* 病情描述 */
@ExportConfig(value = "病情描述", width = 100, showLevel = 1)
private String illness;
/* 过敏史 */
@ExportConfig(value = "过敏史", width = 100, showLevel = 1)
private String allergy;
/* 状态 */
@ExportConfig(value = "是否审核", width = 100, showLevel = 1)
private String status;
/* 药师姓名*/
@ExportConfig(value = "药师姓名", width = 100, showLevel = 1)
private String doctorName;
/* 客服姓名*/
@ExportConfig(value = "客服姓名", width = 100, showLevel = 1)
private String customerName;
}
package com.cftech.consultsheet.model;
import com.cftech.core.poi.ExportConfig;
import lombok.Data;
import org.omg.CORBA.PRIVATE_MEMBER;
/**
* @author :licc
* @date :Created in 2020/9/23 11:57
* @description:
*/
@Data
public class UserSheet {
/* 药师姓名*/
@ExportConfig(value = "药师姓名", width = 100, showLevel = 1)
private String doctorName;
/* 客服姓名*/
@ExportConfig(value = "客服姓名", width = 100, showLevel = 1)
private String customerName;
}
package com.cftech.consultsheet.service;
import com.alibaba.fastjson.JSONObject;
import com.cftech.consultsheet.model.ConsultSheet;
import com.cftech.core.generic.GenericService;
import com.cftech.core.sql.Conds;
/**
* 咨询单Service
*
......@@ -12,4 +15,6 @@ import com.cftech.core.generic.GenericService;
public interface ConsultSheetService extends GenericService<ConsultSheet> {
}
package com.cftech.consultsheet.service.impl;
import com.alibaba.fastjson.JSONObject;
import com.cftech.consultsheet.dao.ConsultSheetMapper;
import com.cftech.consultsheet.model.ConsultSheet;
import com.cftech.consultsheet.service.ConsultSheetService;
......@@ -28,4 +29,6 @@ public GenericDao<ConsultSheet> getGenericMapper() {
return consultSheetMapper;
}
}
\ No newline at end of file
/**
* Created by 16444 on 2020/9/22.
*/
public class TestJava {
}
......@@ -14,8 +14,6 @@
<modules>
<module>consult-module</module>
<module>consult-module-web</module>
<module>product-classify-module</module>
<module>product-classify-module-web</module>
</modules>
<dependencies>
......
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<artifactId>aidea-modules</artifactId>
<groupId>com.cftech</groupId>
<version>1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>product-classify-module-web</artifactId>
<packaging>war</packaging>
<name>product-classify-module-web Maven Webapp</name>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.cftech</groupId>
<artifactId>product-classify-module</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
</dependencies>
<build>
<finalName>product-classify-module-web</finalName>
</build>
</project>
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>aidea-modules</artifactId>
<groupId>com.cftech</groupId>
<version>1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>product-classify-module</artifactId>
<dependencies>
<dependency>
<groupId>com.cftech</groupId>
<artifactId>sys-module</artifactId>
<version>1.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
</dependencies>
</project>
\ No newline at end of file
package com.cftech.productclassify.dao;
import com.cftech.productclassify.model.Productclassify;
import com.cftech.core.generic.GenericDao;
import java.util.List;
import java.util.Map;
/**
* 产品分类Mapper
*
* @author Buyj
* @date: 2020-09-22 18:06
*/
public interface ProductclassifyMapper extends GenericDao<Productclassify> {
/**
* 查产品分类
* @param params
* @return
*/
List<Productclassify> fetchTreeByPage(Map<String, Object> params);
}
\ No newline at end of file
<?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.productclassify.dao.ProductclassifyMapper">
<resultMap id="resultMap" type="com.cftech.productclassify.model.Productclassify">
<id column="id" property="id"/>
<result column="classify_name" property="classifyName"/>
<result column="classify_number" property="classifyNumber"/>
<result column="classify_img" property="classifyImg"/>
<result column="sort" property="sort"/>
<result column="whether_recommend" property="whetherRecommend"/>
<result column="parent_id" property="parentId"/>
<result column="parentName" property="parentName"/>
<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"/>
</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} &lt;&gt; #{cond.value}</if>
<if test="cond.condType == 'GREATEQUAL'">${cond.param} &gt;= #{cond.value}</if>
<if test="cond.condType == 'GREATTHAN'">${cond.param} &gt; #{cond.value}</if>
<if test="cond.condType == 'LESSEQUAL'">${cond.param} &lt;= #{cond.value}</if>
<if test="cond.condType == 'LESSTHAN'">${cond.param} &lt; #{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">
id,
classify_name,
classify_number,
classify_img,
sort,
whether_recommend,
parent_id,
accounts_id,
del_flag,
status,
create_time,
update_time,
description,
create_by,
update_by
</sql>
<insert id="save" parameterType="com.cftech.productclassify.model.Productclassify" useGeneratedKeys="true"
keyProperty="id">
insert into t_aidea_product_classify
(
<include refid="sqlColumns"/>
)
values
(
#{id, jdbcType=BIGINT},
#{classifyName, jdbcType=VARCHAR},
#{classifyNumber, jdbcType=VARCHAR},
#{classifyImg, jdbcType=VARCHAR},
#{sort, jdbcType=VARCHAR},
#{whetherRecommend, jdbcType=VARCHAR},
#{parentId, jdbcType=VARCHAR},
#{accountsId, jdbcType=BIGINT},
#{delFlag, jdbcType=TINYINT},
#{status, jdbcType=VARCHAR},
now(),
now(),
#{description, jdbcType=VARCHAR},
#{createBy, jdbcType=BIGINT},
#{updateBy, jdbcType=BIGINT}
)
</insert>
<select id="fetchTreeByPage" parameterType="java.util.Map" resultMap="resultMap">
SELECT
<include refid="sqlColumns"/>
FROM t_aidea_product_classify
<include refid="sqlWhere"/>
<if test="sort!=null">ORDER BY ${sort.param} ${sort.type}</if>
<if test="limit>0">limit #{offset},#{limit}</if>
</select>
<select id="fetchById" parameterType="java.lang.Long" resultMap="resultMap">
SELECT
<include refid="sqlColumns"/>
FROM t_aidea_product_classify t
WHERE t.id=#{id}
</select>
<select id="count" parameterType="java.util.Map" resultType="java.lang.Integer">
SELECT
COUNT(1)
FROM
t_aidea_product_classify a
LEFT JOIN t_aidea_product_classify b ON b.id = a.parent_id
AND b.del_flag = '0'
<include refid="sqlWhere"/>
</select>
<select id="fetchSearchByPage" parameterType="java.util.Map" resultMap="resultMap">
SELECT
a.id id,
a.classify_name classifyName,
a.classify_number classifyNumber,
a.classify_img classifyImg,
a.sort sort,
a.whether_recommend whetherRecommend,
a.parent_id parentId,
a.del_flag delFlag,
a.create_time createTime,
a.update_time updateTime,
a.description description,
a.create_by crateBy,
a.update_by updateBy,
b.classify_name parentName
FROM
t_aidea_product_classify a
LEFT JOIN t_aidea_product_classify b ON b.id = a.parent_id
AND b.del_flag = '0'
<include refid="sqlWhere"/>
<if test="sort!=null">ORDER BY ${sort.param} ${sort.type}</if>
<if test="limit>0">limit #{offset},#{limit}</if>
</select>
<update id="update" parameterType="com.cftech.productclassify.model.Productclassify">
update t_aidea_product_classify
<set>
<if test="id != null">
id = #{id, jdbcType=BIGINT},
</if>
<if test="classifyName != null">
classify_name = #{classifyName, jdbcType=VARCHAR},
</if>
<if test="classifyNumber != null">
classify_number = #{classifyNumber, jdbcType=VARCHAR},
</if>
<if test="classifyImg != null">
classify_img = #{classifyImg, jdbcType=VARCHAR},
</if>
<if test="sort != null">
sort = #{sort, jdbcType=VARCHAR},
</if>
<if test="whetherRecommend != null">
whether_recommend = #{whetherRecommend, jdbcType=VARCHAR},
</if>
<if test="parentId != null">
parent_id = #{parentId, 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>
</set>
where id=#{id,jdbcType=BIGINT}
</update>
<update id="delete" parameterType="java.lang.Long">
update t_aidea_product_classify set del_flag=1 where id=#{id,jdbcType=BIGINT}
</update>
</mapper>
\ No newline at end of file
package com.cftech.productclassify.model;
import com.cftech.core.poi.ExportConfig;
import lombok.Data;
import org.apache.cxf.jaxws.handler.types.CString;
import java.io.Serializable;
import java.util.Date;
/**
* 产品分类
*
* @author Buyj
* @date: 2020-09-22 18:06
*/
@Data
public class Productclassify implements Serializable {
/* 主键id */
private Long id;
/* 分类名称 */
@ExportConfig(value = "分类名称", width = 100, showLevel = 2)
private String classifyName;
/* 分类编码 */
@ExportConfig(value = "分类编码", width = 100, showLevel = 2)
private String classifyNumber;
/* 分类banner图 */
@ExportConfig(value = "分类banner图", width = 100, showLevel = 1)
private String classifyImg;
/* 序号 */
@ExportConfig(value = "序号", width = 100, showLevel = 2)
private String sort;
/* 是否推荐 */
@ExportConfig(value = "是否推荐(是/否)", width = 200, showLevel = 2)
private String whetherRecommend;
/**
* 父级ID
*/
private String parentId;
/**
* 父级ID 对应的产品分类名称
*/
@ExportConfig(value = "父级编码(不填默认为第一级)", width = 300, showLevel = 2)
private String parentName;
/**
* 父级编码
*/
private String parentNumber;
/* 所属的账号 */
private Long accountsId;
/* 删除标识 */
private boolean delFlag;
/* 状态 */
private String status;
/* 创建时间 */
private Date createTime;
/* 更新时间 */
private Date updateTime;
/* 备注 */
private String description;
/* 创建人 */
private Long createBy;
/* 更新人 */
private Long updateBy;
public Productclassify() {
this.delFlag = false;
this.status = "0";
}
}
\ No newline at end of file
package com.cftech.productclassify.service;
import com.cftech.core.sql.Conds;
import com.cftech.core.sql.Sort;
import com.cftech.productclassify.model.Productclassify;
import com.cftech.core.generic.GenericService;
import java.util.List;
import java.util.Map;
/**
* 产品分类Service
*
* @author Buyj
* @date: 2020-09-22 18:06
*/
public interface ProductclassifyService extends GenericService<Productclassify> {
/**
* 查找产品分类
* @param conds
* @param sort
* @param pageNo
* @param pageSize
* @return
*/
List<Productclassify> fetchTreeByPage(Conds conds , Sort sort,int pageNo , int pageSize);
}
package com.cftech.productclassify.service.impl;
import com.cftech.core.sql.Sort;
import com.cftech.productclassify.model.Productclassify;
import com.cftech.productclassify.dao.ProductclassifyMapper;
import com.cftech.productclassify.service.ProductclassifyService;
import com.cftech.core.generic.GenericDao;
import com.cftech.core.generic.GenericServiceImpl;
import com.cftech.core.sql.Conds;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* 产品分类ServiceImpl
*
* @author Buyj
* @date: 2020-09-22 18:06
*/
@Service("productclassifyService")
public class ProductclassifyServiceImpl extends GenericServiceImpl<Productclassify> implements ProductclassifyService {
@Autowired
@Qualifier("productclassifyMapper")
private ProductclassifyMapper productclassifyMapper;
@Override
public GenericDao<Productclassify> getGenericMapper() {
return productclassifyMapper;
}
@Override
public List<Productclassify> fetchTreeByPage(Conds conds, Sort sort, int pageNo, int pageSize) {
Map<String, Object> params = new HashMap<>();
params.put("conds", conds);
params.put("offset", pageNo > 0 ? pageNo : 0);
params.put("limit", pageSize > 0 ? pageSize : 0);
params.put("sort", sort);
return productclassifyMapper.fetchTreeByPage(params);
}
}
\ No newline at end of file
......@@ -39,8 +39,8 @@ WOEK_TEMPLATE_MESSAGE=8m-_tt_EqoQO-wsE6_JLJdn3nO15_hgUp9mLTujz5RU
userfiles.imgdir=E:\\fileResource
#\u56FE\u7247\u8BBF\u95EE\u5730\u5740
ROOT_ORG_NAME=\u827E\u8FEA\u836F\u4E1A
IMAGEURL=/aidea/mobile/qybase/showPic?picFileName={PICFILENAME}
IMAGEURL=/schaeffler/mobile/qybase/showPic?picFileName={PICFILENAME}
ROOT_ORG_NAME=\u4E1C\u660C\u96C6\u56E2
ROOT_PAPERCATEGORY_NAME=\u95EE\u5377\u7C7B\u578B
ROOT_QUESTIONSCATEGORY_NAME=\u95EE\u9898\u7C7B\u522B
ROOT_MATERIALCATEGORY_NAME=\u7D20\u6750\u7C7B\u522B
......@@ -106,7 +106,6 @@ orderDeliverGoodsTemplateId=TH3I5prFYPC54M14zFJfgN4gvjx8SpJayctIHmzThwg
#\u670D\u52A1\u5B8C\u6210\u901A\u77E5
serverEndTemplateId=7L1KIroXNxejxotFTzll-dVLdo1xbmqoiAo7UmDKWcc
PRODUCT_CLASSIFY_FATHER_NAME=\uFFFD\uFFFD\u01B7\uFFFD\uFFFD\uFFFD\uFFFD
#\u54C1\u724C\u7533\u8BF7\u6D88\u606F\u6A21\u677F
brandApplyCommTemplateId=82ByH2tkWI1-jlYiWr_-CIihWsgjrvLdFvuO771FwBo
......
......@@ -14,7 +14,9 @@ log4j.appender.FILE.DatePattern='.'yyyy-MM-dd
log4j.appender.FILE.layout=org.apache.log4j.PatternLayout
#log4j.appender.FILE.layout=org.apache.log4j.HTMLLayout
log4j.appender.FILE.layout.ConversionPattern=[%-5p] %d{yyyy-MM-dd HH\:mm\:ss} %C{8}@(%F\:%L)\:%m%n
log4j.appender.A1=org.apache.log4j.RollingFileAppender
log4j.appender.A1.Encoding=UTF-8
log4j.appender.A1.File=all.log
# mybatis log
log4j.logger.com=DEBUG
......@@ -21,7 +21,7 @@
*/
//var URL = base + '/ueditor-min-1.4.3/';
//var URL = 'plugins/ueditor-min-1.4.3/';
var URL = '/aidea/assets/adminlte/plugins/ueditor-min-1.4.3/';
var URL = '/schaeffler/assets/adminlte/plugins/ueditor-min-1.4.3/';
/**
* 配置项主体。注意,此处所有涉及到路径的配置别遗漏URL变量。
......
......@@ -365,4 +365,6 @@ public class Conds {
public List<Cond> getConds() {
return conds;
}
}
......@@ -14,7 +14,7 @@ public class SystemConfig {
try {
// inputStream = SystemConfig.class.newInstance().getClass()
// .getClassLoader().getResourceAsStream("");
p.load(new InputStreamReader(SystemConfig.class.getClassLoader().getResourceAsStream("/common-test.properties"), "GBK"));
p.load(new InputStreamReader(SystemConfig.class.getClassLoader().getResourceAsStream("/common-test.properties"), "utf-8"));
inputStreamRedis = SystemConfig.class.newInstance().getClass()
.getClassLoader().getResourceAsStream("/redis-config-test.properties");
......
......@@ -242,9 +242,6 @@
#if($cosconfig.cosType == "qiniu")
<option value="$cosconfig.id">七牛</option>
#end
#if($cosconfig.cosType == "local")
<option value="$cosconfig.id">本地</option>
#end
#end
</select>
</div>
......
......@@ -69,7 +69,6 @@
</ol>
</section>
<!-- Main content -->
<section class="content">
<div class="row">
......
......@@ -2,7 +2,7 @@
<html>
<head>
<base href="#springUrl('/assets/adminlte/')"/>
<meta charset="utf-8">
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>工作台</title>
<!-- Tell the browser to be responsive to screen width -->
......
package com.cftech.mp.fans.controller;
import com.alibaba.fastjson.JSONObject;
import com.cftech.accounts.service.MpAccountsService;
import com.cftech.core.scope.OrderType;
......
......@@ -66,6 +66,7 @@ public class MpFanssController {
model.addAttribute("startTime", startTime);
model.addAttribute("endTime", endTime);
model.addAttribute("mpFanssEntity", mpFanssEntity);
return "managefans/fansslist";
}
......
......@@ -3,6 +3,7 @@ package com.cftech.mp.fans.model;
import com.cftech.sys.model.BasicEntity;
import com.fasterxml.jackson.databind.PropertyNamingStrategy;
import com.fasterxml.jackson.databind.annotation.JsonNaming;
import lombok.Data;
import org.codehaus.jackson.map.annotate.JsonSerialize;
import java.util.Date;
......@@ -12,6 +13,7 @@ import java.util.Date;
*
*/
@JsonSerialize
@Data
@JsonNaming(PropertyNamingStrategy.LowerCaseWithUnderscoresStrategy.class)
public class MpFanssEntity extends BasicEntity{
private static final long serialVersionUID = -2537256381609738771L;
......
......@@ -238,12 +238,6 @@
<version>1.0-SNAPSHOT</version>
<type>war</type>
</dependency>
<dependency>
<groupId>com.cftech</groupId>
<artifactId>product-classify-module-web</artifactId>
<version>1.0-SNAPSHOT</version>
<type>war</type>
</dependency>
<!--<dependency>
<groupId>com.cftech</groupId>
<artifactId>fours-job-module</artifactId>
......
......@@ -112,19 +112,19 @@
maxlength="50" placeholder="组织名称" required="required"
value="$!{data.orgName}">
</div>
<!--<div class="form-group form-md-line-input">-->
<!--<label>组织分类</label>-->
<!--<div class="input-group">-->
<!--<input type="text" id="orgtypeId" name="orgtypeId" value="$!{data.orgtypeId}"-->
<!--class="form-control" style="display: none">-->
<!--<input type="text" id="orgtypeName" name="orgtypeName" value="$!{orgtypeName}"-->
<!--class="form-control" disabled>-->
<!--<span class="input-group-btn">-->
<!--<button type="button" id="orgtypeSelect"-->
<!--class="btn btn-info btn-flat">选择</button>-->
<!--</span>-->
<!--</div>-->
<!--</div>-->
<div class="form-group form-md-line-input">
<label>组织分类</label>
<div class="input-group">
<input type="text" id="orgtypeId" name="orgtypeId" value="$!{data.orgtypeId}"
class="form-control" style="display: none">
<input type="text" id="orgtypeName" name="orgtypeName" value="$!{orgtypeName}"
class="form-control" disabled>
<span class="input-group-btn">
<button type="button" id="orgtypeSelect"
class="btn btn-info btn-flat">选择</button>
</span>
</div>
</div>
<!--<div class="checkbox">-->
<!--<label>-->
<!--<input type="checkbox" id="isAdminUnit" name="isAdminUnit"-->
......
......@@ -105,7 +105,7 @@ public class OrgUnitController {
//提交编辑页面(新增、修改)
@RequiresPermissions(value = PermissionSign.ORGUNIT_EDIT)
@RequestMapping(value = "/formData")
@RequestMapping(value = "/formData",method = {RequestMethod.POST})
@ResponseBody
public JSONObject formData(OrgUnit orgUnit, Model model, HttpServletRequest request) {
Long accountsId = UserUtils.getmpaccounts(request);
......@@ -123,20 +123,20 @@ public class OrgUnitController {
orgUnit.setParentIds("0," + orgUnit.getId() + ",");
}
//同步至企业号
if (StringUtils.isEmpty(orgUnit.getWxorgId())) {
int wxorgid = qyOrgUtil.create(orgUnit, parentOrgUnit);
if (wxorgid == -1) {
log.error("同步微信端出错," + orgUnit.toString());
} else {
orgUnit.setWxorgId("" + wxorgid);
}
} else {
if (!qyOrgUtil.update(orgUnit)) {
log.error("同步微信端出错," + orgUnit.toString());
}
}
// 2017-10-27 取消同步企业号,组织功能
// if (StringUtils.isEmpty(orgUnit.getWxorgId())) {
// int wxorgid = qyOrgUtil.create(orgUnit, parentOrgUnit);
// if (wxorgid == -1) {
// log.error("同步微信端出错," + orgUnit.toString());
// } else {
// orgUnit.setWxorgId("" + wxorgid);
//
// }
// } else {
// if (!qyOrgUtil.update(orgUnit)) {
// log.error("同步微信端出错," + orgUnit.toString());
// }
// }
orgUnitService.updateCache(orgUnit);
rtnJson.put("errorNo", 0);
......@@ -157,13 +157,14 @@ public class OrgUnitController {
orgUnit.setUpdateBy(UserUtils.getUser().getId());
orgUnitService.saveCache(orgUnit);
int wxorgid = qyOrgUtil.create(orgUnit, parentOrgUnit);
if (wxorgid == -1 || wxorgid == 0) {
rtnJson.put("errorNo", 1);
throw new Exception("同步微信端出错");
} else {
orgUnit.setWxorgId("" + wxorgid);
}
// 2017-10-27 取消同步企业号,组织功能
// int wxorgid = qyOrgUtil.create(orgUnit, parentOrgUnit);
// if (wxorgid == -1 || wxorgid == 0) {
// rtnJson.put("errorNo", 1);
// throw new Exception("同步微信端出错");
// } else {
// orgUnit.setWxorgId("" + wxorgid);
// }
orgUnit.setParentIds(orgUnit.getParentIds() + orgUnit.getId() + ",");
orgUnitService.updateCache(orgUnit);
......
......@@ -23,8 +23,8 @@ import java.util.concurrent.TimeUnit;
/**
* 企业号 ACCESS TOKEN 管理
*
* @author Neil
*
*/
@Slf4j
@Component
......@@ -35,6 +35,8 @@ public class QyTokenUtil {
@Autowired
private RedisTemplate<String, String> redisTemplate;
// @Autowired
// private WebHttpInterface webHttpInterface;
private RedisTemplate<String, String> getConfig() {
StringRedisSerializer stringSerializer = new StringRedisSerializer();
......@@ -44,10 +46,9 @@ public class QyTokenUtil {
redisTemplate.setHashValueSerializer(stringSerializer);
return redisTemplate;
}
/**
* 通过企业号corpid刷新最新的token,并返回
*
* 通过企业号corpid刷新最新的token,并返回
* @return
*/
public String getToken(Long accountId)//更新token
......@@ -63,14 +64,13 @@ public class QyTokenUtil {
if (getConfig().hasKey(key)) {
return getConfig().opsForValue().get(key);
}
String token = null;
try {
// 请求企业号认证信息
String url = WxApiConstants.TOKEN_GET.replace("CORPID", accountsEntity.getAppid())
.replace("SECRECT", accountsEntity.getSecret());
String retStr = OKHttpUtils.getJSON(url);
JSONObject retObj = JSON.parseObject(retStr);
token = retObj.getString("access_token");// 缓存token至redis
// String retStr = OKHttpUtils.getJSON(url);
// JSONObject retObj = JSON.parseObject(retStr);
// String token = retObj.getString("access_token");// 缓存token至redis
String token = "1";// webHttpInterface.getValue(url,"access_token");
getConfig().opsForValue().set(key, token);
......@@ -78,16 +78,14 @@ public class QyTokenUtil {
// 继续缓存jsticket
url = WxApiConstants.JSAPI_TICKET_GET.replace("ACCESS_TOKEN", token);
retStr = OKHttpUtils.getJSON(url);
retObj = JSON.parseObject(retStr);
String jsTicket = retObj.getString("ticket");
// retStr = OKHttpUtils.getJSON(url);
// retObj = JSON.parseObject(retStr);
// String jsTicket = retObj.getString("ticket");
String jsTicket = "1";// webHttpInterface.getValue(url,"ticket");
// 缓存token至redis
getConfig().opsForValue().set(jskey, jsTicket);
getConfig().expire(jskey, 6000, TimeUnit.SECONDS);
} catch (IOException e) {
e.printStackTrace();
}
return token;
}
......@@ -146,7 +144,7 @@ public class QyTokenUtil {
/**
* 通过主键ID,获取公众号实体
*/
public MpAccountsEntity searchAccountsById(Long id) {
public MpAccountsEntity searchAccountsById(Long id){
MpAccountsEntity accountsEntity = accountService.getDetail(id);
return accountsEntity;
}
......@@ -154,7 +152,7 @@ public class QyTokenUtil {
/**
* 通过appid,获取公众号实体
*/
public MpAccountsEntity searchAccounts(String appid) {
public MpAccountsEntity searchAccounts(String appid){
MpAccountsEntity accountsEntity = accountService.getMpAccountsAppid(appid);
return accountsEntity;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment