Commit 0c61c730 authored by 卜远杰's avatar 卜远杰

三期患者信息

parent 2b2a6143
<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>authentication-module-web</artifactId>
<packaging>war</packaging>
<name>authentication-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>authentication-module</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
</dependencies>
<build>
<finalName>authentication-module-web</finalName>
</build>
</project>
<!DOCTYPE html>
<!--[if IE 8]>
<html lang="en" class="ie8 no-js"> <![endif]-->
<!--[if IE 9]>
<html lang="en" class="ie9 no-js"> <![endif]-->
<!--[if !IE]><!-->
<html>
<!--<![endif]-->
<!-- BEGIN HEAD -->
<head>
<base href="#springUrl('/assets/adminlte/')"/>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>工作台</title>
<!-- Tell the browser to be responsive to screen width -->
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<!-- Bootstrap 3.3.5 -->
<link rel="stylesheet" href="bootstrap/css/bootstrap.min.css">
<!-- Font Awesome -->
<link rel="stylesheet" href="plugins/font-awesome/css/font-awesome.min.css">
<!-- Ionicons -->
<link rel="stylesheet" href="plugins/ionicons/css/ionicons.min.css">
<!-- DataTables -->
<link rel="stylesheet" href="plugins/datatables/dataTables.bootstrap.css">
<!-- Theme style -->
<link rel="stylesheet" href="dist/css/AdminLTE.min.css">
<!-- AdminLTE Skins. Choose a skin from the css/skins
folder instead of downloading all of them to reduce the load. -->
<link rel="stylesheet" href="dist/css/skins/_all-skins.min.css">
<!-- iCheck -->
<link rel="stylesheet" href="plugins/iCheck/flat/blue.css">
<!-- Date Picker -->
<link rel="stylesheet" href="plugins/datepicker/datepicker3.css">
<!-- Daterange picker -->
<link rel="stylesheet" href="plugins/daterangepicker/daterangepicker-bs3.css">
<!-- bootstrap wysihtml5 - text editor -->
<link rel="stylesheet" href="plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css">
<!--validate css-->
<link rel="stylesheet" href="plugins/jquery-validation/css/validate.css">
<!--fileinput css-->
<link rel="stylesheet" href="plugins/bootstrap-fileinput/bootstrap-fileinput.css">
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<!-- END HEAD -->
<body class="hold-transition skin-blue sidebar-mini">
<div class="wrapper">
<div class="content-wrapper" style="margin-left:0;">
<section class="content-header">
<h1>
身份验证管理
<small>身份验证</small>
</h1>
<ol class="breadcrumb">
<li><a href="#"><i class="fa fa-dashboard"></i>首页</a></li>
<li><a class="active">身份验证</a></li>
</ol>
</section>
<!-- Main content -->
<section class="content">
<div class="row">
<div class="col-xs-12">
<!-- general form elements disabled -->
<div class="box box-primary">
<form role="form" id="myForm">
<input name="id" value="$!{data.id}" hidden="true"/>
<div class="box-body">
<div class="form-group form-md-line-input">
<label>姓名</label>
<input type="text"
class="form-control" name="name"
id="name"
maxlength="500" placeholder="name"
value="$!{data.name}"
>
</div>
<div class="form-group form-md-line-input">
<label>省份证号码</label>
<input type="text"
class="form-control" name="idCard"
id="idCard"
maxlength="500" placeholder="idCard"
value="$!{data.idCard}"
>
</div>
<div class="fform-group form-md-line-input">
<label>描述</label>
<textarea type="text" class="form-control"
value="" maxlength="500"
name="description" placeholder="描述"
>$!{data.description}</textarea>
</div>
</div>
<div class="box-footer">
#if($shiro.hasPermission("qy:authentication:edit"))
<input class="btn btn-primary" id="save" value="保存" type="submit">
#end
<a href="#springUrl('/a/authentication/list')" class="btn btn-default">取消</a>
</div>
</form>
<!-- /.box-body -->
</div><!-- /.box -->
</div><!-- /.col -->
</div><!-- /.row -->
</section><!-- /.content -->
</div><!-- /.content-wrapper -->
<!-- Add the sidebar's background. This div must be placed
immediately after the control sidebar -->
<div class="control-sidebar-bg"></div>
</div><!-- ./wrapper -->
<script src="plugins/jQuery/jQuery-2.1.4.min.js"></script>
<!-- Bootstrap 3.3.5 -->
<script src="bootstrap/js/bootstrap.min.js"></script>
<!-- DataTables -->
<script src="plugins/datatables/jquery.dataTables.min.js"></script>
<script src="plugins/datatables/extensions/i18n/lanauage_ch.js"></script>
<script src="plugins/datatables/dataTables.bootstrap.min.js"></script>
<!-- SlimScroll -->
<script src="plugins/slimScroll/jquery.slimscroll.min.js"></script>
<!-- FastClick -->
<script src="plugins/fastclick/fastclick.min.js"></script>
<!--fileinput js-->
<script src="plugins/bootstrap-fileinput/bootstrap-fileinput.js"></script>
<!-- AdminLTE App -->
<script src="dist/js/app.min.js"></script>
<script src="plugins/bootstrap-maxlength/bootstrap-maxlength.min.js" type="text/javascript"></script>
<script src="plugins/security/sha256.js" type="text/javascript"></script>
<script src="plugins/jquery-validation/js/jquery.validate.min.js"></script>
<script src="js/jquery.form.min.js"></script>
<script type="text/javascript" charset="utf-8" src="plugins/ueditor-min-1.4.3/ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="plugins/ueditor-min-1.4.3/ueditor.all.js"></script>
<script type="text/javascript" charset="utf-8" src="plugins/ueditor-min-1.4.3/lang/zh-cn/zh-cn.js"></script>
<script src="common/js/cfapp.js"></script>
<!-- END PAGE LEVEL PLUGINS -->
<script>
$().ready(function () {
Cfapp.init();
recdTypeAdd.init();
});
function dateToString(date) {
if (date instanceof Date) {
var year = date.getFullYear();
var month = date.getMonth() + 1;
month = month < 10 ? '0' + month: month;
var day = date.getDate();
day = day < 10 ? '0' + day: day;
return year + month + day;
}
return '';
}
var recdTypeAdd = function () {
var initForm = function () {
var initFormCtrl = function () {
bindEvent();
};
var bindEvent = function () {
$("#myForm").validate({
rules: {},
messages: {},
submitHandler: function (form) {
var card = $("#idCard").val();
var reg = /(^\d{15}$)|(^\d{17}(\d|X)$)/;
if(reg.test(card) == false){
Cfapp.alert({
message: "请输入正确格式的省份证号码",
btntext: "确定",
success: function () {
}
});
}else{
//身份证正则表达式(18位)
var isIdCard2 = /^[1-9]\d{5}(19\d{2}|[2-9]\d{3})((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])(\d{4}|\d{3}X)$/i;
var stard = "10X98765432"; //最后一位身份证的号码
var first = [7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2]; //1-17系数
var sum = 0;
if (!isIdCard2.test(card)) {
Cfapp.alert({
message: "请输入正确格式的省份证号码",
btntext: "确定",
success: function () {
}
});
return;
}
var year = card.substr(6, 4);
var month = card.substr(10, 2);
var day = card.substr(12, 2);
var birthday = card.substr(6, 8);
if (birthday != dateToString(new Date(year + '/' + month + '/' + day))) { //校验日期是否合法
Cfapp.alert({
message: "请输入正确格式的省份证号码",
btntext: "确定",
success: function () {
}
});
return;
}
for (var i = 0; i < card.length - 1; i++) {
sum += card[i] * first[i];
}
var result = sum % 11;
var last = stard[result]; //计算出来的最后一位身份证号码
if (card[card.length - 1].toUpperCase() == last) {
//保存
$("#save").attr("disabled", true);
$.getJSON("#springUrl('/a/authentication/formData')", $("#myForm").serialize(), function (returnobj) {
$("#save").attr("disabled", false);
if (returnobj.errorNo == 2) { //保存成功
Cfapp.confirm({
message: "添加成功",
btnoktext: "继续添加",
btncanceltext: "关闭",
success: function () {
location.href = "#springUrl('/a/authentication/form')";
},
cancel: function () {
location.href = "#springUrl('/a/authentication/list')";
}
});
} else if (returnobj.errorNo == 0) { //修改成功
Cfapp.alert({
message: "更新成功",
btntext: "确定",
success: function () {
location.href = "#springUrl('/a/authentication/list')";
}
});
} else {
Cfapp.alert({
message: "创建失败",
btntext: "确定",
success: function () {
location.href = "#springUrl('/a/authentication/list')";
}
});
}
});
} else {
Cfapp.alert({
message: "请输入正确格式的省份证号码",
btntext: "确定",
success: function () {
}
});
return;
}
}
}
})
}
initFormCtrl();
}
return {
//main function to initiate the module
init: function () {
initForm();
}
};
}();
</script>
</body>
<!-- END BODY -->
</html>
\ No newline at end of file
<!DOCTYPE html>
<!--[if IE 8]>
<html lang="en" class="ie8 no-js"> <![endif]-->
<!--[if IE 9]>
<html lang="en" class="ie9 no-js"> <![endif]-->
<!--[if !IE]><!-->
<html>
<!--<![endif]-->
<!-- BEGIN HEAD -->
<head>
<base href="#springUrl('/assets/adminlte/')"/>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>工作台</title>
<!-- Tell the browser to be responsive to screen width -->
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<!-- Bootstrap 3.3.5 -->
<link rel="stylesheet" href="bootstrap/css/bootstrap.min.css">
<!-- Font Awesome -->
<link rel="stylesheet" href="plugins/font-awesome/css/font-awesome.min.css">
<!-- Ionicons -->
<link rel="stylesheet" href="plugins/ionicons/css/ionicons.min.css">
<!-- DataTables -->
<link rel="stylesheet" href="plugins/datatables/dataTables.bootstrap.css">
<!-- Theme style -->
<link rel="stylesheet" href="dist/css/AdminLTE.min.css">
<!-- AdminLTE Skins. Choose a skin from the css/skins
folder instead of downloading all of them to reduce the load. -->
<link rel="stylesheet" href="dist/css/skins/_all-skins.min.css">
<!-- iCheck -->
<link rel="stylesheet" href="plugins/iCheck/flat/blue.css">
<!-- Morris chart -->
<link rel="stylesheet" href="plugins/morris/morris.css">
<!-- jvectormap -->
<link rel="stylesheet" href="plugins/jvectormap/jquery-jvectormap-1.2.2.css">
<!-- Date Picker -->
<link rel="stylesheet" href="plugins/datepicker/datepicker3.css">
<!-- Daterange picker -->
<link rel="stylesheet" href="plugins/daterangepicker/daterangepicker-bs3.css">
<link rel="stylesheet"
href="plugins\bootstrap-fileinput\fileinput.min.css">
<!-- bootstrap wysihtml5 - text editor -->
<link rel="stylesheet" href="plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css">
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body class="hold-transition skin-blue sidebar-mini">
<div class="wrapper">
<div class="content-wrapper" style="margin-left:0;">
<div id="importExcelDiv"></div>
<section class="content-header">
<h1>
身份验证管理
<small>身份验证</small>
</h1>
<ol class="breadcrumb">
<li><a><i class="fa fa-dashboard"></i>首页</a></li>
<li><a class="active">身份验证管理列表</a></li>
</ol>
</section>
<!-- Main content -->
<section class="content">
<div class="row">
<div class="col-xs-12">
<div class="box">
<div class="box-header">
<form id="seachTableForm" action="#springUrl('/a/authentication/exportExcel')" method="get">
<div class="col-xs-2">
<input type="text" class="form-control "
name="name" placeholder="姓名">
</div>
<div class="col-xs-5">
<button type="button" class="search btn btn-primary">搜索</button>
#if($shiro.hasPermission("qy:authentication:edit"))
<a href="#springUrl('/a/authentication/form')" class="btn btn-primary">新增</a>
<button type="submit" class="btn btn-primary">导出</button>
<a onclick="importExcel();" class="btn btn-primary">导入</a>
#end
</div>
</form>
</div><!-- /.box-header -->
<div class="box-body">
<table id="table" class="table table-bordered table-striped">
<thead>
<tr>
<td hidden="true">Id</td>
<th>姓名</th>
<th>省份证号码</th>
<th>描述</th>
<th>创建时间</th>
<th>操作</th>
</tr>
</thead>
<tbody id="tablebody">
</tbody>
</table>
</div><!-- /.box-body -->
</div><!-- /.box -->
</div><!-- /.col -->
</div><!-- /.row -->
</section><!-- /.content -->
</div><!-- /.content-wrapper -->
<!-- Add the sidebar's background. This div must be placed
immediately after the control sidebar -->
<div class="control-sidebar-bg"></div>
</div><!-- ./wrapper -->
<!-- jQuery 2.1.4 -->
<script src="plugins/jQuery/jQuery-2.1.4.min.js"></script>
<!-- Bootstrap 3.3.5 -->
<script src="bootstrap/js/bootstrap.min.js"></script>
<!-- DataTables -->
<script src="plugins/datatables/jquery.dataTables.min.js"></script>
<script src="plugins/datatables/extensions/i18n/lanauage_ch.js"></script>
<script src="plugins/datatables/dataTables.bootstrap.min.js"></script>
<!-- SlimScroll -->
<script src="plugins/slimScroll/jquery.slimscroll.min.js"></script>
<script src="plugins/datepicker/bootstrap-datepicker.js"></script>
<script src="plugins/datepicker/locales/bootstrap-datepicker.zh-CN.js"></script>
<!-- FastClick -->
<script src="plugins/fastclick/fastclick.min.js"></script>
<!--fileinput js-->
<script src="plugins\bootstrap-fileinput\fileinput.js"></script>
<script src="plugins/bootstrap-fileinput/zh.js"></script>
<script src="plugins/bootstrap-fileinput/zh2.js"></script>
<!-- AdminLTE App -->
<script src="dist/js/app.min.js"></script>
<script type="text/javascript"
src="plugins/jquery-validation/js/jquery.validate.min.js"></script>
<!-- AdminLTE for demo purposes -->
<script>
var csrfheader = {name: '_csrf_header', value: '${_csrf.headerName}'};
var csrftoken = {name: '_csrf', value: '${_csrf.token}'};
</script>
<script src="common/js/cfapp.js"></script>
<script>
function formatDates(now) {
var now = new Date(now);
var year = now.getFullYear();
var month = now.getMonth() + 1;
var date = now.getDate();
var hour = now.getHours();
var minute = now.getMinutes();
var second = now.getSeconds();
return year + "-" + month + "-" + date + " " + hour + ":"
+ minute + ":" + second;
}
function seachTable() {
var sSource = "#springUrl('/a/authentication/listData')";
var aoData = {
iDisplayStart: 1,
iDosplayLength: 10
}
var retrieveData = function (sSource, aoData, fnCallback) {
$("#seachTableForm input").each(function () {
var params = {
name: $(this).attr("name"),
value: $(this).val()
};
aoData.push(params);
})
$.ajax({
"type": "GET",
"url": sSource,
"dataType": "json",
"data": aoData, //以json格式传递
"success": fnCallback
});
};
$('#table').DataTable({
"lengthChange": false,
"searching": false,
"ordering": false,
"bFiltered": false,
"bStateSave": true, // save datatable state(pagination, sort, etc) in cookie.
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": sSource,
"fnServerData": retrieveData,
"pagingType": "full_numbers",
"aoColumns": [
{
"mData": "id"
},
{
"mData": "name"
},
{
"mData": "idCard"
},
{
"mData": "description"
},
{
"mData": "createTime"
},
{
"mData": "id"
}],
"aoColumnDefs": [
{ // set default column settings
'visible': false,
'targets': [0]
},
{
"aTargets": [4],
"mData": "createTime",
"mRender": function (a, b, c, d) {
return formatDates(a, "yyyy-MM-dd HH:mm:ss");
}
},
{
"aTargets": [5],
"mData": "id",
"mRender": function (a, b, c, d) {//a表示id对应的值,c表示当前记录行对象
var html = '#if($shiro.hasPermission("qy:authentication:edit"))';
html += '<a href="#springUrl("/a/authentication/form?id=' + a + '")" data-id="' + a + '" data-action="view" class="btn green">修改</a>';
html += '<a href="javascript:void(0);" data-id="' + a + '" data-action="remove" onclick="removeData(' + a + ')" class="btn red">删除</a>';
html += '#end';
return html;
}
}
]
});
}
jQuery(document).ready(function () {
seachTable();
$('.datepicker').datepicker({
show: true,
format: 'yyyy-mm-dd',
autoclose: true,
language: 'zh-CN',
todayBtn: 'linked',
clearBtn: 'linked'
});
$('.search').click(function () {
$("#table").dataTable().fnClearTable();
});
});
Cfapp.init();
function removeData(data) {
Cfapp.confirm({
message: "确定要删除吗",
btnoktext: "确定",
btncanceltext: "取消",
success: function () {
$.ajax({
type: "POST",
url: "#springUrl('/a/authentication/delete')",
data: {id: data, _csrfheader: csrfheader.value, _csrf: csrftoken.value},
dataType: "json",
success: function (data) {
if (data.errorNo == 0) {
Cfapp.alert({
message: "删除成功",
btntext: "确定",
success: function () {
location.href = "#springUrl('/a/authentication/list')";
}
});
}
},
error: function () {
}
})
},
cancel: function () {
$(".modal-backdrop").fadeOut();
}
});
}
function importExcel() {
var templateExcelUrl = "#springUrl('/a/authentication/templateExcel')";
var importExcelUrl = "#springUrl('/a/authentication/importExcel')?_csrf_header=" + csrfheader.value + "&_csrf=" + csrftoken.value;
Cfapp.importExcel({
title: '身份验证导入',
importurl: importExcelUrl,
templateurl: templateExcelUrl,
cancel: function () {
},
success: function () {
location.href = "#springUrl('/a/authentication/list')";
}
});
}
</script>
</body>
</html>
<?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>authentication-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.authentication.dao;
import com.cftech.authentication.model.Authentication;
import com.cftech.core.generic.GenericDao;
/**
* 身份验证Mapper
*
* @author Buyj
* @date: 2020-11-23 16:56
*/
public interface AuthenticationMapper extends GenericDao<Authentication> {
}
\ 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.authentication.dao.AuthenticationMapper">
<resultMap id="resultMap" type="com.cftech.authentication.model.Authentication">
<id column="id" property="id"/>
<result column="id_card" property="idCard"/>
<result column="name" property="name"/>
<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,
id_card,
name,
accounts_id,
del_flag,
status,
create_time,
update_time,
description,
create_by,
update_by
</sql>
<insert id="save" parameterType="com.cftech.authentication.model.Authentication" useGeneratedKeys="true"
keyProperty="id">
insert into t_aidea_authentication
(
<include refid="sqlColumns"/>
)
values
(
#{id, jdbcType=BIGINT},
#{idCard, jdbcType=VARCHAR},
#{name, 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="fetchById" parameterType="java.lang.Long" resultMap="resultMap">
SELECT
<include refid="sqlColumns"/>
FROM t_aidea_authentication t
WHERE t.id=#{id}
</select>
<select id="count" parameterType="java.util.Map" resultType="java.lang.Integer">
SELECT COUNT(1) FROM t_aidea_authentication
<include refid="sqlWhere"/>
</select>
<select id="fetchSearchByPage" parameterType="java.util.Map" resultMap="resultMap">
SELECT
<include refid="sqlColumns"/>
FROM t_aidea_authentication
<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.authentication.model.Authentication">
update t_aidea_authentication
<set>
<if test="id != null">
id = #{id, jdbcType=BIGINT},
</if>
<if test="idCard != null">
id_card = #{idCard, jdbcType=VARCHAR},
</if>
<if test="name != null">
name = #{name, 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_authentication set del_flag=1 where id=#{id,jdbcType=BIGINT}
</update>
</mapper>
\ No newline at end of file
package com.cftech.authentication.model;
import com.cftech.core.poi.ExportConfig;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 身份验证
*
* @author Buyj
* @date: 2020-11-23 16:56
*/
@Data
public class Authentication implements Serializable {
/* 主键id */
private Long id;
@ExportConfig(value = "姓名", width = 100)
private String name;
/* 省份证号码 */
@ExportConfig(value = "省份证号码", width = 100)
private String idCard;
/* 所属的账号 */
private Long accountsId;
/* 删除标识 */
private boolean delFlag;
/* 状态 */
private String status;
/* 更新时间 */
private Date updateTime;
/* 备注 */
@ExportConfig(value = "描述")
private String description;
/* 创建时间 */
@ExportConfig(value = "创建时间",width = 150,showLevel = 1)
private Date createTime;
/* 创建人 */
private Long createBy;
/* 更新人 */
private Long updateBy;
public Authentication() {
this.delFlag = false;
this.status = "0";
}
}
\ No newline at end of file
package com.cftech.authentication.service;
import com.cftech.authentication.model.Authentication;
import com.cftech.core.generic.GenericService;
/**
* 身份验证Service
*
* @author Buyj
* @date: 2020-11-23 16:56
*/
public interface AuthenticationService extends GenericService<Authentication> {
}
package com.cftech.authentication.service.impl;
import com.cftech.authentication.model.Authentication;
import com.cftech.authentication.dao.AuthenticationMapper;
import com.cftech.authentication.service.AuthenticationService;
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;
/**
* 身份验证ServiceImpl
*
* @author Buyj
* @date: 2020-11-23 16:56
*/
@Service("authenticationService")
public class AuthenticationServiceImpl extends GenericServiceImpl<Authentication> implements AuthenticationService {
@Autowired
@Qualifier("authenticationMapper")
private AuthenticationMapper authenticationMapper;
@Override
public GenericDao<Authentication> getGenericMapper() {
return authenticationMapper;
}
}
\ No newline at end of file
package com.cftech.authentication.web;
import com.alibaba.fastjson.JSONObject;
import com.cftech.authentication.model.Authentication;
import com.cftech.authentication.service.AuthenticationService;
import com.cftech.core.poi.ExcelKit;
import com.cftech.core.scope.OrderType;
import com.cftech.core.sql.Conds;
import com.cftech.core.sql.Sort;
import com.cftech.core.util.Constants;
import com.cftech.sys.security.PermissionSign;
import com.cftech.sys.security.UserUtils;
import lombok.extern.slf4j.Slf4j;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.io.IOException;
import java.util.List;
/**
* 身份验证Controller
* <p>
* 权限字符串说明:
* 查看:public static final String AUTHENTICATION_VIEW = "qy:authentication:view"
* 查看:public static final String AUTHENTICATION_EDIT = "qy:authentication:edit"
*
* @author Buyj
* @date: 2020-11-23 16:56
*/
@Slf4j
@Controller
@RequestMapping("/a/authentication")
public class AuthenticationController {
public static final String AUTHENTICATION_VIEW = "qy:authentication:view";
public static final String AUTHENTICATION_EDIT = "qy:authentication:edit";
@Autowired
private AuthenticationService authenticationService;
//列表页面
@RequiresPermissions(value = AUTHENTICATION_VIEW)
@RequestMapping("/list")
public String list(HttpServletRequest request, Model model) {
Long accountId = UserUtils.getmpaccounts(request);
model.addAttribute("accountId", accountId);
return "authentication/authenticationlist";
}
//编辑页面(新增、修改)
@RequiresPermissions(value = AUTHENTICATION_VIEW)
@RequestMapping("/form")
public String form(HttpServletRequest request, String id, Model model) {
if (!StringUtils.isEmpty(id)) {
Authentication authentication = authenticationService.fetchById(id);
model.addAttribute("data", authentication);
}
return "authentication/authenticationform";
}
//提交数据(新增、修改)
@RequiresPermissions(value = AUTHENTICATION_EDIT)
@RequestMapping("/formData")
@ResponseBody
public JSONObject formData(Authentication authentication, Model model, HttpServletRequest request) {
Long accountsId = UserUtils.getmpaccounts(request);
JSONObject rtnJson = new JSONObject();
try {
if (authentication != null && authentication.getId() != null) {
authentication.setUpdateBy(UserUtils.getUser().getId());
authenticationService.update(authentication);
rtnJson.put("errorNo", 0);
} else {
authentication.setAccountsId(accountsId);
authentication.setDelFlag(false);
authentication.setAccountsId(UserUtils.getmpaccounts(request));
authentication.setCreateBy(UserUtils.getUser().getId());
authentication.setUpdateBy(UserUtils.getUser().getId());
authenticationService.save(authentication);
rtnJson.put("errorNo", 2);
}
} catch (Exception e) {
rtnJson.put("errorNo", 1);
}
return rtnJson;
}
//获取列表数据
@RequiresPermissions(value = AUTHENTICATION_VIEW)
@RequestMapping(value = "/listData")
@ResponseBody
public JSONObject listData(int iDisplayStart, int iDisplayLength, Authentication authentication, HttpServletRequest request) {
Long accountsId = UserUtils.getmpaccounts(request);
Conds conds = new Conds();
conds.equal("del_flag", Constants.DEL_FLAG_0);
conds.equal("accounts_id", accountsId);
if (!StringUtils.isEmpty(authentication.getName())) {
conds.like("name", authentication.getName());
}
Sort sort = new Sort("create_time", OrderType.DESC);
List<Authentication> list = authenticationService.fetchSearchByPage(conds, sort, iDisplayStart, iDisplayLength);
Integer counts = authenticationService.count(conds);
JSONObject rtnJson = new JSONObject();
rtnJson.put("iTotalRecords", counts);
rtnJson.put("iTotalDisplayRecords", counts);
rtnJson.put("aaData", list);
return rtnJson;
}
//删除数据
@RequiresPermissions(value = AUTHENTICATION_EDIT)
@RequestMapping("/delete")
@ResponseBody
public JSONObject delete(String id) {
JSONObject rtnJosn = new JSONObject();
try {
authenticationService.delete(id);
rtnJosn.put("errorNo", 0);
} catch (Exception e) {
rtnJosn.put("errorNo", 1);
}
return rtnJosn;
}
@RequestMapping("/exportExcel")
@RequiresPermissions(value = AUTHENTICATION_VIEW)
public void exportExcel(HttpServletRequest request, HttpServletResponse response, Authentication authentication) {
Long accountId = UserUtils.getmpaccounts(request);
Conds conds = new Conds();
conds.equal("del_flag", Constants.DEL_FLAG_0);
conds.equal("accounts_id", accountId);
if (!StringUtils.isEmpty(authentication.getName())) {
conds.like("name", authentication.getName());
}
Sort sort = new Sort("create_time", OrderType.DESC);
List<Authentication> list = authenticationService.fetchSearchByPage(conds, sort, 0, 0);
ExcelKit.$Export(Authentication.class, response).toExcel(list, "身份验证信息");
}
@RequestMapping("/templateExcel")
@RequiresPermissions(value = AUTHENTICATION_VIEW)
public void templateExcel(HttpServletRequest request, HttpServletResponse response) {
ExcelKit.$Export(Authentication.class, response).toExcel(null, "身份验证信息");
}
@RequestMapping("/importExcel")
@RequiresPermissions(value = AUTHENTICATION_EDIT)
@ResponseBody
public JSONObject importExcel(HttpServletRequest request, MultipartFile file, Model model) {
JSONObject retJson = new JSONObject();
Long accountId = UserUtils.getmpaccounts(request);
StringBuffer sb = new StringBuffer();
if (file == null) {
retJson.put("errorNo", "1");
retJson.put("errorMsg", "未选择导入文件");
return retJson;
}
// 构造临时路径来存储上传的文件
String uploadPath = System.getProperty("java.io.tmpdir");
File uploadDir = new File(uploadPath);
if (!uploadDir.exists()) {
uploadDir.mkdir();
}
String fileName = file.getOriginalFilename();
String filePath = uploadPath + File.separator + fileName;
File storeFile = new File(filePath);
try {
file.transferTo(storeFile);
ExcelKit.$Import().setEmptyCellValue("").readExcel(storeFile, rowData -> {
Authentication authentication = new Authentication();
authentication.setAccountsId(accountId);
if (!StringUtils.isEmpty(rowData.get(0))) {
authentication.setName(rowData.get(0));
}
if (!StringUtils.isEmpty(rowData.get(1))) {
if (rowData.get(1).length() == 15 || rowData.get(1).length() == 18){
authentication.setIdCard(rowData.get(1));
}else{
sb.append(rowData.get(0)+",");
return;
}
}
if (!StringUtils.isEmpty(rowData.get(2))) {
authentication.setDescription(rowData.get(2));
}
authenticationService.save(authentication);
});
} catch (IOException e) {
log.error(e.getMessage());
}
retJson.put("errorNo", "0");
if(sb.length() > 0){
retJson.put("errorMsg","部分导入失败,原因:未填写正确的身份证号码,导入失败名称:"+sb.toString());
}else{
retJson.put("errorMsg", "导入成功");
}
return retJson;
}
}
...@@ -76,7 +76,7 @@ ...@@ -76,7 +76,7 @@
<div class="col-xs-12"> <div class="col-xs-12">
<div class="box"> <div class="box">
<div class="box-header"> <div class="box-header">
<form id="seachTableForm" action="#springUrl('/a/consultSheet/list')" method="get"> <form id="seachTableForm" action="#springUrl('/a/consultSheet/exportExcel')" method="get">
<div class="col-xs-2"> <div class="col-xs-2">
<input type="text" class="form-control" <input type="text" class="form-control"
...@@ -132,7 +132,7 @@ ...@@ -132,7 +132,7 @@
<a href="javascript:void(0)" class="btn btn-primary search">搜索</a> <a href="javascript:void(0)" class="btn btn-primary search">搜索</a>
<button type="button" class="btn btn-info" onclick="clearSearch()">重置</button> <button type="button" class="btn btn-info" onclick="clearSearch()">重置</button>
#if($shiro.hasPermission("qy:consultSheet:edit")) #if($shiro.hasPermission("qy:consultSheet:edit"))
<a href="#springUrl('/a/consultSheet/exportExcel')" class="btn btn-primary">导出</a> <button type="submit" class="btn btn-primary">导出</button>
#end #end
</form> </form>
......
...@@ -32,5 +32,11 @@ ...@@ -32,5 +32,11 @@
<artifactId>shipping-address-module</artifactId> <artifactId>shipping-address-module</artifactId>
<version>1.0-SNAPSHOT</version> <version>1.0-SNAPSHOT</version>
</dependency> </dependency>
<dependency>
<groupId>com.cftech</groupId>
<artifactId>shipping-address-module</artifactId>
<version>1.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
</dependencies> </dependencies>
</project> </project>
\ No newline at end of file
...@@ -17,6 +17,9 @@ public class ConsultSheetVO { ...@@ -17,6 +17,9 @@ public class ConsultSheetVO {
@ExportConfig(value = "咨询单编码", width = 100, showLevel = 1) @ExportConfig(value = "咨询单编码", width = 100, showLevel = 1)
private String consultId; private String consultId;
@ExportConfig(value = "订单编号" , width = 100, showLevel = 1)
private String orderCode;
/* 用药人name */ /* 用药人name */
@ExportConfig(value = "用药人姓名", width = 100, showLevel = 1) @ExportConfig(value = "用药人姓名", width = 100, showLevel = 1)
private String userName; private String userName;
...@@ -53,5 +56,14 @@ public class ConsultSheetVO { ...@@ -53,5 +56,14 @@ public class ConsultSheetVO {
@ExportConfig(value = "客服姓名", width = 100, showLevel = 1) @ExportConfig(value = "客服姓名", width = 100, showLevel = 1)
private String customerName; private String customerName;
@ExportConfig(value = "拒绝原因" , width = 100 , showLevel = 1)
private String description;
@ExportConfig(value = "提交时间" , width = 100, showLevel = 1)
private String createTime;
@ExportConfig(value = "审核时间" , width = 100, showLevel = 1)
private String auditTime;
} }
...@@ -203,26 +203,47 @@ public class ConsultSheetController { ...@@ -203,26 +203,47 @@ public class ConsultSheetController {
@RequestMapping("/exportExcel") @RequestMapping("/exportExcel")
@RequiresPermissions(value = CONSULTSHEET_VIEW) @RequiresPermissions(value = CONSULTSHEET_VIEW)
public void exportExcel(HttpServletRequest request, HttpServletResponse response) { public void exportExcel(HttpServletRequest request, HttpServletResponse response, ConsultSheet consultSheet) {
Long accountId = UserUtils.getmpaccounts(request); Long accountId = UserUtils.getmpaccounts(request);
Sort sort = new Sort("a.create_time", OrderType.ASC); Sort sort = new Sort("a.create_time", OrderType.ASC);
Conds conds = new Conds(); Conds conds = new Conds();
conds.equal("a.del_flag", 0); if (StringUtils.isNoneBlank(consultSheet.getConsultId())) {
conds.like("a.consult_id", "%" + consultSheet.getConsultId() + "%");
}
if (StringUtils.isNoneBlank(consultSheet.getStartCreateTime())) {
conds.greatEqual("DATE_FORMAT(a.create_time, '%Y-%m-%d')", consultSheet.getStartCreateTime());
}
if (StringUtils.isNoneBlank(consultSheet.getEndCreateTime())) {
conds.lessEqual("DATE_FORMAT(a.create_time, '%Y-%m-%d')", consultSheet.getEndCreateTime());
}
if (StringUtils.isNoneBlank(consultSheet.getStartAuditTime())) {
conds.greatEqual("DATE_FORMAT(a.audit_time, '%Y-%m-%d')", consultSheet.getStartAuditTime());
}
if (StringUtils.isNoneBlank(consultSheet.getEndAuditTime())) {
conds.lessEqual("DATE_FORMAT(a.audit_time, '%Y-%m-%d')", consultSheet.getEndAuditTime());
}
conds.equal("a.del_flag", Constants.DEL_FLAG_0);
conds.equal("a.accounts_id", accountId);
List<ConsultSheet> list = consultSheetService.fetchSearchByPage(conds, sort, 0, 0); List<ConsultSheet> list = consultSheetService.fetchSearchByPage(conds, sort, 0, 0);
List<ConsultSheetVO> consultSheetVOS = new LinkedList<>(); List<ConsultSheetVO> consultSheetVOS = new LinkedList<>();
for (ConsultSheet consultSheet : list) { ConsultSheetVO consultSheetVO = null;
ConsultSheetVO consultSheetVO = new ConsultSheetVO(); for (ConsultSheet consultSheetObj : list) {
consultSheetVO.setConsultId(consultSheet.getConsultId()); consultSheetVO = new ConsultSheetVO();
consultSheetVO.setUserName(consultSheet.getUserName()); consultSheetVO.setOrderCode(consultSheetObj.getOrderCode());
consultSheetVO.setSex(consultSheet.getSex() == 1 ? "男" : "女"); consultSheetVO.setConsultId(consultSheetObj.getConsultId());
consultSheetVO.setPhone(consultSheet.getPhone()); consultSheetVO.setUserName(consultSheetObj.getUserName());
consultSheetVO.setPastRecords("0".equals(consultSheet.getPastRecords()) ? "否" : "是"); consultSheetVO.setSex(consultSheetObj.getSex() == 1 ? "男" : "女");
consultSheetVO.setIllness("0".equals(consultSheet.getIllness()) ? "否" : "是"); consultSheetVO.setPhone(consultSheetObj.getPhone());
consultSheetVO.setAllergy("0".equals(consultSheet.getAllergy()) ? "否" : "是"); consultSheetVO.setPastRecords("0".equals(consultSheetObj.getPastRecords()) ? "否" : "是");
consultSheetVO.setStatus("0".equals(consultSheet.getStatus()) ? "未审核" : "1".equals(consultSheet.getStatus()) ? "已通过" : "已拒绝"); consultSheetVO.setIllness("0".equals(consultSheetObj.getIllness()) ? "否" : "是");
consultSheetVO.setPharmaName(consultSheet.getPharmaName()); consultSheetVO.setAllergy("0".equals(consultSheetObj.getAllergy()) ? "否" : "是");
consultSheetVO.setCustomerName(consultSheet.getCustomerName()); consultSheetVO.setStatus("0".equals(consultSheetObj.getStatus()) ? "未审核" : "1".equals(consultSheetObj.getStatus()) ? "已通过" : "已拒绝");
consultSheetVO.setPharmaName(consultSheetObj.getPharmaName());
consultSheetVO.setCustomerName(consultSheetObj.getCustomerName());
consultSheetVO.setDescription(consultSheetObj.getDescription());
consultSheetVO.setCreateTime(DateUtils.formatDateTime(consultSheetObj.getCreateTime()));
consultSheetVO.setAuditTime(consultSheetObj.getAuditTime() == null? "" : consultSheetObj.getAuditTime());
consultSheetVOS.add(consultSheetVO); consultSheetVOS.add(consultSheetVO);
} }
ExcelKit.$Export(ConsultSheetVO.class, response).toExcel(consultSheetVOS, "咨询单信息"); ExcelKit.$Export(ConsultSheetVO.class, response).toExcel(consultSheetVOS, "咨询单信息");
......
...@@ -103,7 +103,7 @@ ...@@ -103,7 +103,7 @@
<div class="col-xs-12"> <div class="col-xs-12">
<div class="box"> <div class="box">
<div class="box-header"> <div class="box-header">
<form id="seachTableForm" action="#springUrl('/a/order/list')" method="get"> <form id="seachTableForm" action="#springUrl('/a/order/exportExcel')" method="get">
<div class="col-xs-2"> <div class="col-xs-2">
<input type="text" class="form-control" <input type="text" class="form-control"
name="number" value="" placeholder="订单编号"> name="number" value="" placeholder="订单编号">
...@@ -183,7 +183,7 @@ ...@@ -183,7 +183,7 @@
<button type="button" class="btn btn-info" onclick="clearSearch()">重置</button> <button type="button" class="btn btn-info" onclick="clearSearch()">重置</button>
#if($shiro.hasPermission("qy:order:edit")) #if($shiro.hasPermission("qy:order:edit"))
<!-- <a href="#springUrl('/a/order/form')" class="btn btn-primary">新增</a>--> <!-- <a href="#springUrl('/a/order/form')" class="btn btn-primary">新增</a>-->
<a href="#springUrl('/a/order/exportExcel')" class="btn btn-primary">导出</a> <button type="submit" class="btn btn-primary">导出</button>
#end #end
<!-- <a onclick="importExcel();" class="btn btn-primary">导入</a>--> <!-- <a onclick="importExcel();" class="btn btn-primary">导入</a>-->
......
...@@ -12,28 +12,48 @@ import java.util.Date; ...@@ -12,28 +12,48 @@ import java.util.Date;
*/ */
@Data @Data
public class OrderVO { public class OrderVO {
/* 产品编码 */ @ExportConfig(value = "订单编码" , width = 100, showLevel = 1)
@ExportConfig(value = "商品编码", width = 100, showLevel = 1) private String number;
private String productNumber;
/* 产品名称 */ @ExportConfig(value = "咨询单编码", width = 100 , showLevel = 1)
private String consultCode;
@ExportConfig(value = "商品名称", width = 100, showLevel = 1) @ExportConfig(value = "商品名称", width = 100, showLevel = 1)
private String productName; private String productName;
/* 订单金额 */
@ExportConfig(value = "订单金额", width = 100, showLevel = 1) @ExportConfig(value = "订单金额", width = 100, showLevel = 1)
private Double orderAmount; private Double orderAmount;
/* 收货地址 */
@ExportConfig(value = "收货地址", width = 100, showLevel = 1) @ExportConfig(value = "付款金额" , width = 100, showLevel = 1)
private String address; private Double totalAmount;
@ExportConfig(value = "昵称" , width = 100, showLevel = 1)
private String nickName;
@ExportConfig(value = "openId" , width = 100,showLevel = 1)
private String openid;
@ExportConfig(value = "快递单号", width = 100, showLevel = 1) @ExportConfig(value = "快递单号", width = 100, showLevel = 1)
private String courierNumber; private String courierNumber;
@ExportConfig(value = "订单状态", width = 100, showLevel = 1)
private String payStatus;
private String productNumber;
private String address;
/* 交易号 支付宝/第三方平台 返回订单号 */ /* 交易号 支付宝/第三方平台 返回订单号 */
@ExportConfig(value = "支付交易号", width = 100, showLevel = 1) @ExportConfig(value = "支付交易号", width = 100, showLevel = 1)
private String tradeNo; private String tradeNo;
@ExportConfig(value = "是否开发票",width = 100,showLevel = 1)
private String confirm;
/* 创建时间 */ /* 创建时间 */
@ExportConfig(value = "创建时间", width = 100, showLevel = 1) @ExportConfig(value = "创建时间", width = 100, showLevel = 1)
private String createTime; private String createTime;
/* 订单状态 */
@ExportConfig(value = "订单状态", width = 100, showLevel = 1)
private String payStatus;
} }
...@@ -219,25 +219,81 @@ public class OrderController { ...@@ -219,25 +219,81 @@ public class OrderController {
@RequestMapping("/exportExcel") @RequestMapping("/exportExcel")
@RequiresPermissions(value = ORDER_VIEW) @RequiresPermissions(value = ORDER_VIEW)
public void exportExcel(HttpServletRequest request, HttpServletResponse response) { public void exportExcel(HttpServletRequest request, HttpServletResponse response, Order order) {
Long accountId = UserUtils.getmpaccounts(request); Long accountId = UserUtils.getmpaccounts(request);
Sort sort = new Sort("o.create_time", OrderType.ASC); Sort sort = new Sort("o.create_time", OrderType.ASC);
Conds conds = new Conds(); Conds conds = new Conds();
conds.equal("o.del_flag", 0); conds.equal("o.del_flag", 0);
conds.equal("o.accounts_id", accountId); conds.equal("o.accounts_id", accountId);
//咨询单编码
if (StringUtils.isNoneBlank(order.getConsultCode())) {
conds.like("cs.consult_id", order.getConsultCode());
}
//订单编码
if (StringUtils.isNoneBlank(order.getNumber())) {
conds.like("o.number", order.getNumber());
}
//产品名称
if (StringUtils.isNoneBlank(order.getProductNameTmp())) {
conds.like("t.product_name", order.getProductNameTmp());
}
//顺丰运单号
if (StringUtils.isNoneBlank(order.getCourierNumber())) {
conds.like("o.courier_number", order.getCourierNumber());
}
//订单开始金额
if (StringUtils.isNoneBlank(order.getStartOrderAmount())) {
conds.greatEqual("o.order_amount", order.getStartOrderAmount());
}
//订单结束金额
if (StringUtils.isNoneBlank(order.getEndOrderAmount())) {
conds.lessEqual("o.order_amount", order.getEndOrderAmount());
}
//最终开始金额
if (StringUtils.isNoneBlank(order.getStartPayAmount())) {
conds.greatEqual("o.total_amount", order.getStartPayAmount());
}
//最终结束金额
if (StringUtils.isNoneBlank(order.getEndPayAmount())) {
conds.lessEqual("o.total_amount", order.getEndPayAmount());
}
//订单状态
if (StringUtils.isNoneBlank(order.getStatus())) {
conds.equal("o.status", order.getStatus());
}
//是否开票
if (StringUtils.isNoneBlank(order.getIsBill()) && StringUtils.equals(order.getIsBill(), "1")) {//未开票
conds.isNull("o.confirm");
} else if (StringUtils.isNoneBlank(order.getIsBill()) && StringUtils.equals(order.getIsBill(), "0")) {//已开票
conds.notNull("o.confirm");
}
//订单开始时间
if (StringUtils.isNoneBlank(order.getOrderStartTime())) {
conds.greatEqual("DATE_FORMAT(o.create_time, '%Y-%m-%d')", order.getOrderStartTime());
}
//订单结束时间
if (StringUtils.isNoneBlank(order.getOrderEndTime())) {
conds.lessEqual("DATE_FORMAT(o.create_time, '%Y-%m-%d')", order.getOrderEndTime());
}
List<Order> list = orderService.fetchSearchByPage(conds, sort, 0, 0); List<Order> list = orderService.fetchSearchByPage(conds, sort, 0, 0);
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd"); SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
LinkedList<OrderVO> orderVOS = new LinkedList<>(); LinkedList<OrderVO> orderVOS = new LinkedList<>();
for (Order order : list) { OrderVO orderVO = null;
OrderVO orderVO = new OrderVO(); for (Order orderObject : list) {
orderVO.setProductNumber(order.getProductNumber()); orderVO = new OrderVO();
orderVO.setProductName(order.getProductName()); orderVO.setNumber(orderObject.getNumber());
orderVO.setOrderAmount(order.getOrderAmount()); orderVO.setConsultCode(orderObject.getConsultCode());
orderVO.setAddress(order.getAddress()); orderVO.setProductName(orderObject.getProductName());
orderVO.setCourierNumber(order.getCourierNumber()); orderVO.setOrderAmount(orderObject.getOrderAmount());
orderVO.setTradeNo(order.getTradeNo()); orderVO.setTotalAmount(orderObject.getTotalAmount());
orderVO.setCreateTime(simpleDateFormat.format(order.getCreateTime())); orderVO.setNickName(orderObject.getNickName());
orderVO.setPayStatus(order.getPayStatus().equals("0") ? "待确认" : order.getPayStatus().equals("1") ? "待付款" : order.getPayStatus().equals("2") ? "待发货" :order.getPayStatus().equals("3") ? "待收货":order.getPayStatus().equals("4") ? "已完成" :"已取消"); orderVO.setOpenid(orderObject.getOpenid());
orderVO.setCourierNumber(orderObject.getCourierNumber());
orderVO.setTradeNo(orderObject.getTradeNo());
orderVO.setPayStatus(orderObject.getPayStatus() == null ? "" : orderObject.getPayStatus() == 0 ? "待确认" : orderObject.getPayStatus() == 1 ? "待付款" : orderObject.getPayStatus() == 2 ? "待发货" :orderObject.getPayStatus() == 3 ? "待收货":
orderObject.getPayStatus() == 4 ? "已完成" :"已取消");
orderVO.setConfirm(StringUtils.isNotBlank(orderObject.getConfirm()) ? "是":"否");
orderVO.setCreateTime(simpleDateFormat.format(orderObject.getCreateTime()));
orderVOS.add(orderVO); orderVOS.add(orderVO);
} }
ExcelKit.$Export(OrderVO.class, response).toExcel(orderVOS, "订单管理信息"); ExcelKit.$Export(OrderVO.class, response).toExcel(orderVOS, "订单管理信息");
......
...@@ -30,6 +30,8 @@ ...@@ -30,6 +30,8 @@
<module>reportform-module-web</module> <module>reportform-module-web</module>
<module>waybill-module</module> <module>waybill-module</module>
<module>waybill-module-web</module> <module>waybill-module-web</module>
<module>authentication-module</module>
<module>authentication-module-web</module>
</modules> </modules>
......
...@@ -63,7 +63,10 @@ public class ProductDetailController { ...@@ -63,7 +63,10 @@ public class ProductDetailController {
@RequestMapping("/form") @RequestMapping("/form")
public String form(HttpServletRequest request, String id, Model model) { public String form(HttpServletRequest request, String id, Model model) {
if (!StringUtils.isEmpty(id)) { if (!StringUtils.isEmpty(id)) {
ProductDetail productDetail = productDetailService.fetchById(id); Conds conds = new Conds();
conds.equal("d.del_flag",0);
conds.equal("d.id",id);
ProductDetail productDetail = productDetailService.fetchSearchByConds(conds);
model.addAttribute("data", productDetail); model.addAttribute("data", productDetail);
} }
return "productDetail/productDetailform"; return "productDetail/productDetailform";
......
...@@ -76,7 +76,7 @@ ...@@ -76,7 +76,7 @@
<div class="col-xs-12"> <div class="col-xs-12">
<div class="box"> <div class="box">
<div class="box-header"> <div class="box-header">
<form id="seachTableForm" action="#springUrl('/a/waybill/list')" method="get"> <form id="seachTableForm" action="#springUrl('/a/waybill/exportExcel')" method="get">
<div class="col-xs-2"> <div class="col-xs-2">
<input type="text" class="form-control" name="number" placeholder="物流编码"> <input type="text" class="form-control" name="number" placeholder="物流编码">
</div> </div>
...@@ -97,7 +97,7 @@ ...@@ -97,7 +97,7 @@
<button type="button" class="search btn btn-primary">搜索</button> <button type="button" class="search btn btn-primary">搜索</button>
#if($shiro.hasPermission("qy:waybill:edit")) #if($shiro.hasPermission("qy:waybill:edit"))
<!--<a href="#springUrl('/a/waybill/form')" class="btn btn-primary">新增</a>--> <!--<a href="#springUrl('/a/waybill/form')" class="btn btn-primary">新增</a>-->
<a href="#springUrl('/a/waybill/exportExcel')" class="btn btn-primary">导出</a> <button type="submit" class="btn btn-primary">导出</button>
<!--<a onclick="importExcel();" class="btn btn-primary">导入</a>--> <!--<a onclick="importExcel();" class="btn btn-primary">导入</a>-->
#end #end
</div> </div>
......
...@@ -18,73 +18,76 @@ public class Waybill implements Serializable { ...@@ -18,73 +18,76 @@ public class Waybill implements Serializable {
/* 主键id */ /* 主键id */
private Long id; private Long id;
/* 咨询单Id */ /* 咨询单Id */
@ExportConfig(value = "咨询单Id", width = 100, showLevel = 1)
private Long consultId; private Long consultId;
/* 订单Id */ /* 订单Id */
@ExportConfig(value = "订单Id", width = 100, showLevel = 1)
private Long orderId; private Long orderId;
/* 物流单编码 */ /* 物流单编码 */
@ExportConfig(value = "物流单编码", width = 100, showLevel = 1) @ExportConfig(value = "物流单编码", width = 100, showLevel = 1)
private String number; private String number;
/* 会员Id */ /* 会员Id */
@ExportConfig(value = "会员Id", width = 100, showLevel = 1)
private String memberId; private String memberId;
/* 粉丝Id */ /* 粉丝Id */
@ExportConfig(value = "粉丝Id", width = 100, showLevel = 1)
private String openId; private String openId;
/* 仓管员Id */ /* 仓管员Id */
@ExportConfig(value = "仓管员Id", width = 100, showLevel = 1)
private String storageManage; private String storageManage;
/* 顺丰运单号 */ /* 顺丰运单号 */
@ExportConfig(value = "顺丰运单号", width = 100, showLevel = 1) @ExportConfig(value = "顺丰运单号", width = 100, showLevel = 1)
private String waybillNo; private String waybillNo;
/* 语言 */ /* 语言 */
@ExportConfig(value = "语言", width = 100, showLevel = 1)
private String language; private String language;
/* 顺丰月结卡号 */ /* 顺丰月结卡号 */
@ExportConfig(value = "顺丰月结卡号", width = 100, showLevel = 1)
private String monthlyCard; private String monthlyCard;
/**
* 会员名称
*/
@ExportConfig(value = "会员名称", width = 100, showLevel = 1)
private String memberName;
@ExportConfig(value = "联系人", width = 100, showLevel = 1)
private String contact;
/* 快件产品类型 */ /* 快件产品类型 */
@ExportConfig(value = "快件产品类型", width = 100, showLevel = 1)
private String expressTypeId; private String expressTypeId;
/* 温度范围控制 1:冷藏 3:冷冻 */ /* 温度范围控制 1:冷藏 3:冷冻 */
@ExportConfig(value = "温度范围控制 1:冷藏 3:冷冻", width = 100, showLevel = 1)
private String temperatureRange; private String temperatureRange;
/* 联系人 */ /* 联系人 */
@ExportConfig(value = "联系人", width = 100, showLevel = 1)
private String contact;
/* 联系电话 */ /* 联系电话 */
@ExportConfig(value = "联系电话", width = 100, showLevel = 1) @ExportConfig(value = "联系电话", width = 100, showLevel = 1)
private String mobile; private String mobile;
/* 省份 */ /* 省份 */
@ExportConfig(value = "省份", width = 100, showLevel = 1)
private String province; private String province;
/* 城市 */ /* 城市 */
@ExportConfig(value = "城市", width = 100, showLevel = 1)
private String city; private String city;
/* 县/区级行政区名称 */ /* 县/区级行政区名称 */
@ExportConfig(value = "县/区级行政区名称", width = 100, showLevel = 1)
private String county; private String county;
/* 地址Id */ /* 地址Id */
@ExportConfig(value = "地址Id", width = 100, showLevel = 1)
private String addressId; private String addressId;
/* 详细地址 */ /* 详细地址 */
@ExportConfig(value = "详细地址", width = 100, showLevel = 1)
private String address; private String address;
/* 发件时间 */ /* 发件时间 */
@ExportConfig(value = "发件时间", width = 100, showLevel = 1)
private Date sendExpressDate; private Date sendExpressDate;
/* 收件时间 */ /* 收件时间 */
@ExportConfig(value = "收件时间", width = 100, showLevel = 1)
private Date acceptExpressDate; private Date acceptExpressDate;
/* 运单描述 */ /* 运单描述 */
@ExportConfig(value = "运单描述", width = 100, showLevel = 1)
private String waybillRemark; private String waybillRemark;
/* 所属的账号 */ /* 所属的账号 */
private Long accountsId; private Long accountsId;
/* 删除标识 */ /* 删除标识 */
private boolean delFlag; private boolean delFlag;
/* 状态 */ /* 状态 */
@ExportConfig(value = "物流状态", width = 100, showLevel = 1)
private String status; private String status;
/* 创建时间 */ /* 创建时间 */
private Date createTime; private Date createTime;
...@@ -105,7 +108,7 @@ public class Waybill implements Serializable { ...@@ -105,7 +108,7 @@ public class Waybill implements Serializable {
private String drugsName;//商品名称 private String drugsName;//商品名称
private String drugsCode;//商品编码 private String drugsCode;//商品编码
private String price;//价格 private String price;//价格
private String memberName;//会员名称
private String consultSheetCode;//咨询单编码 private String consultSheetCode;//咨询单编码
private String storageManageName;//仓管员名称 private String storageManageName;//仓管员名称
private String sendExpressDateStr; private String sendExpressDateStr;
......
...@@ -150,12 +150,29 @@ public class WaybillController { ...@@ -150,12 +150,29 @@ public class WaybillController {
@RequestMapping("/exportExcel") @RequestMapping("/exportExcel")
@RequiresPermissions(value = WAYBILL_VIEW) @RequiresPermissions(value = WAYBILL_VIEW)
public void exportExcel(HttpServletRequest request, HttpServletResponse response) { public void exportExcel(HttpServletRequest request, HttpServletResponse response , Waybill waybill) {
Long accountId = UserUtils.getmpaccounts(request); Long accountsId = UserUtils.getmpaccounts(request);
Sort sort = new Sort("create_time", OrderType.ASC);
Conds conds = new Conds(); Conds conds = new Conds();
conds.equal("del_flag", 0); conds.equal("t.del_flag", Constants.DEL_FLAG_0);
conds.equal("accounts_id", accountId); conds.equal("t.accounts_id", accountsId);
if (StringUtils.isNoneBlank(waybill.getNumber())) {
conds.equal("t.number", waybill.getNumber());
}
if (StringUtils.isNoneBlank(waybill.getWaybillNo())) {
conds.equal("t.waybill_no", waybill.getWaybillNo());
}
if (StringUtils.isNoneBlank(waybill.getOrderCode())) {
conds.equal("o.number", waybill.getOrderCode());
}
if (StringUtils.isNoneBlank(waybill.getContact())) {
conds.like("t.contact", "%" + waybill.getContact() + "%");
}
Sort sort = new Sort("t.create_time", OrderType.DESC);
List<Waybill> list = waybillService.fetchSearchByPage(conds, sort, 0, 0); List<Waybill> list = waybillService.fetchSearchByPage(conds, sort, 0, 0);
ExcelKit.$Export(Waybill.class, response).toExcel(list, "顺丰物流运单信息"); ExcelKit.$Export(Waybill.class, response).toExcel(list, "顺丰物流运单信息");
} }
......
...@@ -238,49 +238,59 @@ ...@@ -238,49 +238,59 @@
//选择栏目 //选择栏目
$("#columnSelect").click(function () { $("#columnSelect").click(function () {
var type = $("#typeselect").val(); var type = $("#typeselect").val();
if (type == "4") { if ( type =="" || type == null ){
columnUrl ="#springUrl('/a/wxQrcode/listOrg')" Cfapp.alert({
} else { message: "请先选择二维码类型",
columnUrl ="#springUrl('/a/wxQrcode/listUser?type=" + type + "')" btntext: "确定",
} success: function () {
var title = type == "4" ? "人员名称" : "组织名称";
Cfapp.f7({
dataUrl: columnUrl,
checkType: 'single', // 多选为multi
title: "选择二维码绑定对象",
btnoktext: "确定",
btncanceltext: "取消",
columns: ['选择', title],
isSearch: '0',
searchColumns: ["name"],//搜索的字段名称
searchColumnsRemarks: [title],//搜索的字段备注
aoColumns: [{
"mData": "id"
}, {
"mData": "name"
}],
aoColumnDefs: [{
"aTargets": [0],
"mData": "id",
"mRender": function (a, b, c, d) {
return '<input class="bindId" value="' + a + '" type="radio" id="' + a + '" name="sel" data-value="' + a + '" data-name="' + c.name + '">';
}
}, {
"aTargets": [1],
"mData": "name",
"mRender": function (a, b, c, d) {//a表示createtime对应的值,c表示当前记录行对象
return a;
} }
}], });
success: function () { } else {
if (type == "4") {
columnUrl ="#springUrl('/a/wxQrcode/listOrg')"
} else {
columnUrl ="#springUrl('/a/wxQrcode/listUser?type=" + type + "')"
}
var title = type == "4" ? "组织名称" : "人员名称";
Cfapp.f7({
dataUrl: columnUrl,
checkType: 'single', // 多选为multi
title: "选择二维码绑定对象",
btnoktext: "确定",
btncanceltext: "取消",
columns: ['选择', title],
isSearch: '0',
searchColumns: ["name"],//搜索的字段名称
searchColumnsRemarks: [title],//搜索的字段备注
aoColumns: [{
"mData": "id"
}, {
"mData": "name"
}],
aoColumnDefs: [{
"aTargets": [0],
"mData": "id",
"mRender": function (a, b, c, d) {
return '<input class="bindId" value="' + a + '" type="radio" id="' + a + '" name="sel" data-value="' + a + '" data-name="' + c.name + '">';
}
}, {
"aTargets": [1],
"mData": "name",
"mRender": function (a, b, c, d) {//a表示createtime对应的值,c表示当前记录行对象
return a;
}
}],
success: function () {
}, },
cancel: function () { cancel: function () {
},
storeFields: 'bindId', // 储存的字段
displayFields: 'columnName'
})
}
},
storeFields: 'bindId', // 储存的字段
displayFields: 'columnName'
})
}); });
var recdTypeAdd = function () { var recdTypeAdd = function () {
......
...@@ -49,6 +49,11 @@ public class WxQrcode implements Serializable { ...@@ -49,6 +49,11 @@ public class WxQrcode implements Serializable {
/* 绑定对象 */ /* 绑定对象 */
private String qrcodeNames; private String qrcodeNames;
/**
* 绑定对象显示的名字
*/
private String objectName;
public WxQrcode() { public WxQrcode() {
this.delFlag = false; this.delFlag = false;
this.status = "0"; this.status = "0";
......
...@@ -63,6 +63,7 @@ public class WxQrcodeController { ...@@ -63,6 +63,7 @@ public class WxQrcodeController {
private WxQrcodeUtil wxQrcodeUtil; private WxQrcodeUtil wxQrcodeUtil;
//下载展厅二维码 //下载展厅二维码
@RequestMapping(value = "/downloadcode", method = {RequestMethod.GET, RequestMethod.POST}) @RequestMapping(value = "/downloadcode", method = {RequestMethod.GET, RequestMethod.POST})
public void downloadcode(Long id, WxQrcode qrcode, String name, HttpServletRequest request, HttpServletResponse response) throws IOException { public void downloadcode(Long id, WxQrcode qrcode, String name, HttpServletRequest request, HttpServletResponse response) throws IOException {
......
...@@ -259,19 +259,14 @@ public class MemberController { ...@@ -259,19 +259,14 @@ public class MemberController {
Long accountsId = UserUtils.getmpaccounts(request); Long accountsId = UserUtils.getmpaccounts(request);
Conds conds = new Conds(); Conds conds = new Conds();
conds.equal("m.del_flag", Constants.DEL_FLAG_0); conds.equal("m.del_flag", Constants.DEL_FLAG_0);
// conds.equal("m.accounts_id", accountsId);
// if(member.getStatus().equals("1")){ //注册会员
// conds.isNull("m.status");
// }else if(member.getStatus().equals("2")){ //虚拟会员
// conds.equal("m.status",1);
// }
// if (!StringUtils.isEmpty(member.getCompan())) {
// conds.like("m.compan", member.getCompan());
// }
// if (!StringUtils.isEmpty(member.getName())) {
// conds.like("m.name", member.getName());
// }
if (!StringUtils.isEmpty(member.getName())){
conds.like("CONVERT(AES_DECRYPT(m.name,'aideakey') USING UTF8)", member.getName());
}
if (!StringUtils.isEmpty(member.getPhone())){
conds.like("CONVERT(AES_DECRYPT(m.phone,'aideakey') USING UTF8)",member.getPhone());
}
Sort sort = new Sort("m.create_time", OrderType.DESC); Sort sort = new Sort("m.create_time", OrderType.DESC);
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd"); SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
...@@ -311,8 +306,8 @@ public class MemberController { ...@@ -311,8 +306,8 @@ public class MemberController {
} }
// 生成Excel并使用浏览器下载
ExcelKit.$Export(MemberDto.class, response).toExcel(list, "会员信息");
} }
// 生成Excel并使用浏览器下载
ExcelKit.$Export(MemberDto.class, response).toExcel(list, "会员信息");
} }
} }
...@@ -131,8 +131,11 @@ public class MpFanssController { ...@@ -131,8 +131,11 @@ public class MpFanssController {
Long id = UserUtils.getmpaccounts(request); Long id = UserUtils.getmpaccounts(request);
Sort sort = new Sort("t.subscribetime", OrderType.DESC); Sort sort = new Sort("t.subscribetime", OrderType.DESC);
Conds conds = new Conds(); Conds conds = new Conds();
if (StringUtils.isNotBlank(mpFanssEntity.getSource())) {
conds.equal("source", mpFanssEntity.getSource());
}
if (StringUtils.isNotBlank(mpFanssEntity.getNickname())) { if (StringUtils.isNotBlank(mpFanssEntity.getNickname())) {
conds.like("t.nickname", mpFanssEntity.getNickname()); conds.like("CONVERT(AES_DECRYPT(nickname,'aideakey') USING UTF8)", mpFanssEntity.getNickname());
} }
if (StringUtils.isNotBlank(startTime)) { if (StringUtils.isNotBlank(startTime)) {
conds.greatEqual("t.subscribetime", startTime); conds.greatEqual("t.subscribetime", startTime);
......
...@@ -79,6 +79,7 @@ ...@@ -79,6 +79,7 @@
<module>workshop-module-web</module> <module>workshop-module-web</module>
<module>schaeffler-modules</module> <module>schaeffler-modules</module>
<module>aidea-modules</module> <module>aidea-modules</module>
<module>authentication-module-web</module>
</modules> </modules>
......
...@@ -298,6 +298,12 @@ ...@@ -298,6 +298,12 @@
<version>1.0-SNAPSHOT</version> <version>1.0-SNAPSHOT</version>
<type>war</type> <type>war</type>
</dependency> </dependency>
<dependency>
<groupId>com.cftech</groupId>
<artifactId>authentication-module-web</artifactId>
<version>1.0-SNAPSHOT</version>
<type>war</type>
</dependency>
</dependencies> </dependencies>
<build> <build>
<finalName>portal-web</finalName> <finalName>portal-web</finalName>
......
...@@ -45,6 +45,7 @@ public class QyuserVO implements Serializable { ...@@ -45,6 +45,7 @@ public class QyuserVO implements Serializable {
@ExportConfig(value = "性别", width = 120) @ExportConfig(value = "性别", width = 120)
private String gender; private String gender;
@ExportConfig(value = "峰值", width = 120)
private String peakVal; private String peakVal;
// @ExportConfig(value = "粉丝关注数", width = 100,showLevel=1) // @ExportConfig(value = "粉丝关注数", width = 100,showLevel=1)
......
...@@ -252,7 +252,7 @@ public class OrgUnitController { ...@@ -252,7 +252,7 @@ public class OrgUnitController {
@RequestMapping(value = "/exportExcel",method = {RequestMethod.GET,RequestMethod.POST}) @RequestMapping(value = "/exportExcel",method = {RequestMethod.GET,RequestMethod.POST})
@RequiresPermissions(value = PermissionSign.ORGUNIT_VIEW) @RequiresPermissions(value = PermissionSign.ORGUNIT_VIEW)
public void exportExcel(HttpServletRequest request, HttpServletResponse response) { public void exportExcel(HttpServletRequest request, HttpServletResponse response , OrgUnit orgUnit) {
Long accountId = Long.parseLong(qyAccounts); Long accountId = Long.parseLong(qyAccounts);
Sort sort = new Sort("parent_id", OrderType.ASC); Sort sort = new Sort("parent_id", OrderType.ASC);
Conds conds = new Conds(); Conds conds = new Conds();
...@@ -261,6 +261,12 @@ public class OrgUnitController { ...@@ -261,6 +261,12 @@ public class OrgUnitController {
// User user = UserUtils.getUser(); // User user = UserUtils.getUser();
// Qyuser qyuser = qyuserService.fetchById(user.getUserid()); // Qyuser qyuser = qyuserService.fetchById(user.getUserid());
// Long orgId = qyuser.getOrgId(); // Long orgId = qyuser.getOrgId();
if(!StringUtils.isEmpty(orgUnit.getNumber())){
conds.equal("t.number", orgUnit.getNumber());
}
if (!StringUtils.isEmpty(orgUnit.getOrgName())) {
conds.like("t.org_name", orgUnit.getOrgName());
}
List<OrgUnit> orgunits = orgUnitService.fetchSearchByPage(null, conds, sort, 0, 0); List<OrgUnit> orgunits = orgUnitService.fetchSearchByPage(null, conds, sort, 0, 0);
// 生成Excel并使用浏览器下载 // 生成Excel并使用浏览器下载
......
...@@ -66,15 +66,17 @@ ...@@ -66,15 +66,17 @@
display: inline-block; display: inline-block;
} }
.bootstrap-switch-container{display: -webkit-box; .bootstrap-switch-container {
white-space: nowrap;} display: -webkit-box;
white-space: nowrap;
}
</style> </style>
</head> </head>
<body class="hold-transition skin-blue sidebar-mini"> <body class="hold-transition skin-blue sidebar-mini">
<!-- END HEAD --> <!-- END HEAD -->
<div id="f7"></div> <div id="f7"></div>
<div class="wrapper"> <div class="wrapper">
<div class="content-wrapper" style="margin-left:0;"> <div class="content-wrapper" style="margin-left:0;">
...@@ -83,10 +85,10 @@ ...@@ -83,10 +85,10 @@
用户管理 用户管理
<small>账号信息</small> <small>账号信息</small>
</h1> </h1>
<!-- <ol class="breadcrumb"> --> <!-- <ol class="breadcrumb"> -->
<!-- <li><a href="#springUrl('/page/user/showstatics')"><i class="fa fa-dashboard"></i>首页</a></li> --> <!-- <li><a href="#springUrl('/page/user/showstatics')"><i class="fa fa-dashboard"></i>首页</a></li> -->
<!-- <li><a class="active">添加用户</a></li> --> <!-- <li><a class="active">添加用户</a></li> -->
<!-- </ol> --> <!-- </ol> -->
</section> </section>
...@@ -106,8 +108,10 @@ ...@@ -106,8 +108,10 @@
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="password">密码</label> <label for="password">密码</label>
<input type="password" class="form-control required htmlescape" name="password" id="password" <input type="password" class="form-control required htmlescape" name="password"
placeholder="请输入密码" maxlength="50" minlength="3" onfocus="this.removeAttribute('readonly');"> id="password"
placeholder="请输入密码" maxlength="50" minlength="3"
onfocus="this.removeAttribute('readonly');">
</div> </div>
...@@ -120,7 +124,8 @@ ...@@ -120,7 +124,8 @@
<div class="form-group"> <div class="form-group">
<label for="password">描述</label> <label for="password">描述</label>
<input type="text" class="form-control htmlescape" maxlength="100" name="description" <input type="text" class="form-control htmlescape" maxlength="100"
name="description"
id="description" placeholder="请填写描述"> id="description" placeholder="请填写描述">
</div> </div>
...@@ -130,26 +135,26 @@ ...@@ -130,26 +135,26 @@
<input type="email" class="form-control htmlescape" name="email" id="email" <input type="email" class="form-control htmlescape" name="email" id="email"
placeholder="请填写邮箱"> placeholder="请填写邮箱">
</div> </div>
<div class="form-group" style="display:none"> <div class="form-group" style="display:none">
<label for="password">经销商编码</label> <label for="password">经销商编码</label>
<input type="text" class="form-control" name="empid" id="empid" <input type="text" class="form-control" name="empid" id="empid"
placeholder="请填写经销商编码"> placeholder="请填写经销商编码">
</div> </div>
<!--<div class="form-group form-md-line-input">--> <!--<div class="form-group form-md-line-input">-->
<!--<label>SA人员绑定</label>--> <!--<label>SA人员绑定</label>-->
<!--<div class="input-group">--> <!--<div class="input-group">-->
<!--<input type="text" id="userid" name="userid" --> <!--<input type="text" id="userid" name="userid" -->
<!--class="form-control" style="display: none">--> <!--class="form-control" style="display: none">-->
<!--<input type="text" id="wxUserName" name="wxUserName" --> <!--<input type="text" id="wxUserName" name="wxUserName" -->
<!--class="form-control" disabled>--> <!--class="form-control" disabled>-->
<!--<span class="input-group-btn">--> <!--<span class="input-group-btn">-->
<!--<button type="button" id="orgtypeSelect"--> <!--<button type="button" id="orgtypeSelect"-->
<!--class="btn btn-info btn-flat">选择</button>--> <!--class="btn btn-info btn-flat">选择</button>-->
<!--</span>--> <!--</span>-->
<!--</div>--> <!--</div>-->
<!--</div>--> <!--</div>-->
<div class="form-group"> <div class="form-group">
<table id="qytable" class="table"> <table id="qytable" class="table">
...@@ -162,7 +167,8 @@ ...@@ -162,7 +167,8 @@
</thead> </thead>
<tbody> <tbody>
<tr class="trEle"> <tr class="trEle">
<td><select class="form-control select2 qyaccount" data-placeholder="请选择企业号"> <td><select class="form-control select2 qyaccount"
data-placeholder="请选择企业号">
#foreach( $account in $qyaccounts ) #foreach( $account in $qyaccounts )
<option value="${account.id}">${account.description}</option> <option value="${account.id}">${account.description}</option>
#end #end
...@@ -197,19 +203,22 @@ ...@@ -197,19 +203,22 @@
</thead> </thead>
<tbody> <tbody>
<tr class="trEle"> <tr class="trEle">
<td><select class="form-control select2 account" data-placeholder="请选择公众号"> <td>
#foreach( $account in $accounts ) <select class="form-control select2 account" data-placeholder="请选择公众号">
<option value="${account.id}">${account.description}</option> #foreach( $account in $accounts )
#end <option value="${account.id}">${account.description}</option>
</select></td> #end
<td><select class="form-control select2 role" style="width:100%;" </select>
</td>
<td>
<select class="form-control select2 role" style="width:100%;"
multiple="multiple" data-placeholder="请选择角色"> multiple="multiple" data-placeholder="请选择角色">
#foreach( $role in $roles ) #foreach( $role in $roles )
<option value="${role.id}" data-attr="${role.roleSign}"> <option value="${role.id}" data-attr="${role.roleSign}">
${role.roleName} ${role.roleName}
</option> </option>
#end #end
</select> </select>
</td> </td>
<td> <td>
<div class="switch"> <div class="switch">
...@@ -220,7 +229,10 @@ ...@@ -220,7 +229,10 @@
</tr> </tr>
</tbody> </tbody>
</table> </table>
</div> <button type="button" class="btn btn-info" id="addQyAccounts" style="display:none">添加企业号</button> </div>
<button type="button" class="btn btn-info" id="addQyAccounts" style="display:none">
添加企业号
</button>
<button type="button" class="btn btn-info" id="addAccounts">添加公众号</button> <button type="button" class="btn btn-info" id="addAccounts">添加公众号</button>
</div> </div>
...@@ -243,8 +255,8 @@ ...@@ -243,8 +255,8 @@
</div><!-- /.content-wrapper --> </div><!-- /.content-wrapper -->
<!-- Add the sidebar's background. This div must be placed immediately after the control sidebar --> <!-- Add the sidebar's background. This div must be placed immediately after the control sidebar -->
<div class="control-sidebar-bg"></div> <div class="control-sidebar-bg"></div>
</div><!-- ./wrapper --> </div><!-- ./wrapper -->
<script src="plugins/jQuery/jQuery-2.1.4.min.js"></script> <script src="plugins/jQuery/jQuery-2.1.4.min.js"></script>
<!-- Bootstrap 3.3.5 --> <!-- Bootstrap 3.3.5 -->
...@@ -267,8 +279,8 @@ ...@@ -267,8 +279,8 @@
<script src="plugins/jquery-validation/js/jquery.validate.min.js"></script> <script src="plugins/jquery-validation/js/jquery.validate.min.js"></script>
<script src="plugins/jquery-validation/js/localization/messages_zh.js"></script> <script src="plugins/jquery-validation/js/localization/messages_zh.js"></script>
<script> <script>
var csrfheader = {name:'_csrf_header',value:'${_csrf.headerName}'}; var csrfheader = {name: '_csrf_header', value: '${_csrf.headerName}'};
var csrftoken = {name:'_csrf',value:'${_csrf.token}'}; var csrftoken = {name: '_csrf', value: '${_csrf.token}'};
</script> </script>
<script src="common/js/cfapp.js"></script> <script src="common/js/cfapp.js"></script>
...@@ -279,8 +291,8 @@ ...@@ -279,8 +291,8 @@
<!-- END PAGE LEVEL PLUGINS --> <!-- END PAGE LEVEL PLUGINS -->
<script> <script>
function formSubmit(data) { function formSubmit(data) {
data._csrf_header=csrfheader.value; data._csrf_header = csrfheader.value;
data._csrf=csrftoken.value; data._csrf = csrftoken.value;
$.post("#springUrl('/a/manageuser/adduser')", data, function (returnobj) { $.post("#springUrl('/a/manageuser/adduser')", data, function (returnobj) {
if (returnobj.errorNo == '1') { if (returnobj.errorNo == '1') {
Cfapp.confirm({ Cfapp.confirm({
...@@ -308,7 +320,7 @@ ...@@ -308,7 +320,7 @@
} }
}); });
} }
var sQyUserSource = "#springUrl('/a/qyuser/listData')"; var sQyUserSource = "#springUrl('/a/qyuser/listData')";
var bindSwitch = function () { var bindSwitch = function () {
...@@ -332,11 +344,12 @@ ...@@ -332,11 +344,12 @@
var accountId = ""; var accountId = "";
$("#roleform").on("click", ".delAccounts", function () { $("#roleform").on("click", ".delAccounts", function () {
if ( $('.trEle').length == 1) { if ($('.trEle').length == 1) {
Cfapp.alert({ Cfapp.alert({
message: "至少绑定一个微信平台!", message: "至少绑定一个微信平台!",
btntext: "确认", btntext: "确认",
success: function () {} success: function () {
}
}); });
return; return;
} }
...@@ -423,9 +436,8 @@ ...@@ -423,9 +436,8 @@
Cfapp.init(); Cfapp.init();
UserAdd.init(); UserAdd.init();
$(".select2").select2(); $(".select2").select2();
$('#orgtypeSelect').on('click', $('#orgtypeSelect').on('click',
function () { function () {
Cfapp.f7({ Cfapp.f7({
...@@ -434,7 +446,7 @@ ...@@ -434,7 +446,7 @@
title: "绑定SA人员", title: "绑定SA人员",
btnoktext: "确定", btnoktext: "确定",
btncanceltext: "取消", btncanceltext: "取消",
columns: ['选择', '姓名','手机号码'], columns: ['选择', '姓名', '手机号码'],
aoColumns: [{ aoColumns: [{
"mData": "id" "mData": "id"
}, { }, {
...@@ -459,7 +471,7 @@ ...@@ -459,7 +471,7 @@
storeFields: 'userid' // 储存的字段 storeFields: 'userid' // 储存的字段
}) })
}); });
}); });
</script> </script>
</body> </body>
......
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