liangpeile преди 1 година
родител
ревизия
4f06a4fd84
променени са 17 файла, в които са добавени 755 реда и са изтрити 48 реда
  1. 13 8
      medical_history-vue/src/views/admin/AdminTransferAccountsList.vue
  2. 184 0
      medical_history-vue/src/views/sysusercompany/SysUserCompanyList.vue
  3. 133 0
      medical_history-vue/src/views/sysusercompany/modules/SysUserCompanyForm.vue
  4. 60 0
      medical_history-vue/src/views/sysusercompany/modules/SysUserCompanyModal.vue
  5. 1 0
      medical_history/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroConfig.java
  6. 165 1
      medical_history/jeecg-boot-module-system/pom.xml
  7. 27 10
      medical_history/jeecg-boot-module-system/src/main/java/org/jeecg/modules/adminuser/controller/AdminDoctorUserController.java
  8. 82 0
      medical_history/jeecg-boot-module-system/src/main/java/org/jeecg/modules/adminuser/entity/AdminTransferAccounts.java
  9. 1 0
      medical_history/jeecg-boot-module-system/src/main/java/org/jeecg/modules/adminuser/service/IAdminTransferAccountsService.java
  10. 65 0
      medical_history/jeecg-boot-module-system/src/main/java/org/jeecg/modules/adminuser/service/impl/AdminTransferAccountsServiceImpl.java
  11. 6 25
      medical_history/jeecg-boot-module-system/src/main/java/org/jeecg/modules/adminuser/service/impl/AdminUserServiceImpl.java
  12. 3 0
      medical_history/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/entity/SysUser.java
  13. 5 0
      medical_history/jeecg-boot-module-system/src/main/java/org/jeecg/modules/sysusercompany/entity/SysUserCompany.java
  14. 4 0
      medical_history/jeecg-boot-module-system/src/main/java/org/jeecg/modules/sysusercompany/service/impl/SysUserCompanyServiceImpl.java
  15. 3 1
      medical_history/jeecg-boot-module-system/src/main/resources/application-dev.yml
  16. 1 1
      medical_history/jeecg-boot-module-system/src/main/resources/jeecg/jeecg_config.properties
  17. 2 2
      medical_history/pom.xml

+ 13 - 8
medical_history-vue/src/views/admin/AdminTransferAccountsList.vue

@@ -176,32 +176,37 @@
           {
             title:'医生姓名',
             align:"center",
-            dataIndex: 'transferDoctor'
+            dataIndex: 'realName'
           }, {
             title:'银行卡',
             align:"center",
-            dataIndex: 'transferCode'
+            dataIndex: 'cardNo'
           },
 
           {
             title:'转账金额',
             align:"center",
-            dataIndex: 'transferMoney'
+            dataIndex: 'pay'
           },
           {
             title:'转账结果',
             align:"center",
-            dataIndex: 'transferResults_dictText'
+            dataIndex: 'statusMessage'
           },
+          // {
+          //   title:'结果信息',
+          //   align:"center",
+          //   dataIndex: 'statusDetailMessage'
+          // },
           {
-            title:'结果信息',
+            title:'转账备注',
             align:"center",
-            dataIndex: 'resultsMess'
+            dataIndex: 'payRemark'
           },
           {
-            title:'转账备注',
+            title:'银行名称',
             align:"center",
-            dataIndex: 'transferNotes'
+            dataIndex: 'bankName'
           },
           {
             title:'创建时间',

+ 184 - 0
medical_history-vue/src/views/sysusercompany/SysUserCompanyList.vue

@@ -0,0 +1,184 @@
+<template>
+  <a-card :bordered="false">
+    <!-- 查询区域 -->
+    <div class="table-page-search-wrapper">
+      <a-form layout="inline" @keyup.enter.native="searchQuery">
+        <a-row :gutter="24">
+        </a-row>
+      </a-form>
+    </div>
+    <!-- 查询区域-END -->
+
+    <!-- 操作按钮区域 -->
+    <div class="table-operator">
+      <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
+<!--      <a-button type="primary" icon="download" @click="handleExportXls('公司用户管理')">导出</a-button>-->
+<!--      <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">-->
+<!--        <a-button type="primary" icon="import">导入</a-button>-->
+<!--      </a-upload>-->
+<!--      &lt;!&ndash; 高级查询区域 &ndash;&gt;-->
+<!--      <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>-->
+      <a-dropdown v-if="selectedRowKeys.length > 0">
+        <a-menu slot="overlay">
+          <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
+        </a-menu>
+        <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
+      </a-dropdown>
+    </div>
+
+    <!-- table区域-begin -->
+    <div>
+      <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
+        <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
+        <a style="margin-left: 24px" @click="onClearSelected">清空</a>
+      </div>
+
+      <a-table
+        ref="table"
+        size="middle"
+        :scroll="{x:true}"
+        bordered
+        rowKey="id"
+        :columns="columns"
+        :dataSource="dataSource"
+        :pagination="ipagination"
+        :loading="loading"
+        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
+        class="j-table-force-nowrap"
+        @change="handleTableChange">
+
+        <template slot="htmlSlot" slot-scope="text">
+          <div v-html="text"></div>
+        </template>
+        <template slot="imgSlot" slot-scope="text">
+          <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
+          <img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
+        </template>
+        <template slot="fileSlot" slot-scope="text">
+          <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
+          <a-button
+            v-else
+            :ghost="true"
+            type="primary"
+            icon="download"
+            size="small"
+            @click="downloadFile(text)">
+            下载
+          </a-button>
+        </template>
+
+        <span slot="action" slot-scope="text, record">
+          <a @click="handleEdit(record)">编辑</a>
+
+          <a-divider type="vertical" />
+          <a-dropdown>
+            <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
+            <a-menu slot="overlay">
+              <a-menu-item>
+                <a @click="handleDetail(record)">详情</a>
+              </a-menu-item>
+              <a-menu-item>
+                <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
+                  <a>删除</a>
+                </a-popconfirm>
+              </a-menu-item>
+            </a-menu>
+          </a-dropdown>
+        </span>
+
+      </a-table>
+    </div>
+
+    <sys-user-company-modal ref="modalForm" @ok="modalFormOk"></sys-user-company-modal>
+  </a-card>
+</template>
+
+<script>
+
+  import '@/assets/less/TableExpand.less'
+  import { mixinDevice } from '@/utils/mixin'
+  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+  import SysUserCompanyModal from './modules/SysUserCompanyModal'
+
+  export default {
+    name: 'SysUserCompanyList',
+    mixins:[JeecgListMixin, mixinDevice],
+    components: {
+      SysUserCompanyModal,
+    },
+    data () {
+      return {
+        description: '公司用户管理管理页面',
+        // 表头
+        columns: [
+          {
+            title: '#',
+            dataIndex: '',
+            key:'rowIndex',
+            width:60,
+            align:"center",
+            customRender:function (t,r,index) {
+              return parseInt(index)+1;
+            }
+          },
+          {
+            title:'公司账号',
+            align:"center",
+            dataIndex: 'companyCode'
+          },
+          {
+            title:'公司名称',
+            align:"center",
+            dataIndex: 'companyName'
+          },
+
+          // {
+          //   title:'密码',
+          //   align:"center",
+          //   dataIndex: 'password'
+          // },
+          {
+            title: '操作',
+            dataIndex: 'action',
+            align:"center",
+            fixed:"right",
+            width:147,
+            scopedSlots: { customRender: 'action' }
+          }
+        ],
+        url: {
+          list: "/SysUserCompany/sysUserCompany/list",
+          delete: "/SysUserCompany/sysUserCompany/delete",
+          deleteBatch: "/SysUserCompany/sysUserCompany/deleteBatch",
+          exportXlsUrl: "/SysUserCompany/sysUserCompany/exportXls",
+          importExcelUrl: "SysUserCompany/sysUserCompany/importExcel",
+
+        },
+        dictOptions:{},
+        superFieldList:[],
+      }
+    },
+    created() {
+    this.getSuperFieldList();
+    },
+    computed: {
+      importExcelUrl: function(){
+        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
+      },
+    },
+    methods: {
+      initDictConfig(){
+      },
+      getSuperFieldList(){
+        let fieldList=[];
+        fieldList.push({type:'string',value:'companyName',text:'公司名称',dictCode:''})
+        fieldList.push({type:'string',value:'companyCode',text:'公司编码',dictCode:''})
+        fieldList.push({type:'string',value:'password',text:'密码',dictCode:''})
+        this.superFieldList = fieldList
+      }
+    }
+  }
+</script>
+<style scoped>
+  @import '~@assets/less/common.less';
+</style>

+ 133 - 0
medical_history-vue/src/views/sysusercompany/modules/SysUserCompanyForm.vue

@@ -0,0 +1,133 @@
+<template>
+  <a-spin :spinning="confirmLoading">
+    <j-form-container :disabled="formDisabled">
+      <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
+        <a-row>
+          <a-col :span="24">
+            <a-form-model-item label="公司账号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="companyCode">
+              <a-input v-model="model.companyCode" placeholder="请输入公司账号"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="云账户转账" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="yzh" >
+              <j-dict-select-tag v-model="model.yzh_dictText" placeholder="云账户转账" dictCode="yzh_auth"></j-dict-select-tag>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="公司名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="companyName">
+              <a-input v-model="model.companyName" placeholder="请输入公司名称"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+
+
+          <a-col :span="24">
+            <a-form-model-item label="密码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="password">
+              <a-input-password v-model="model.password" placeholder="请输入密码" />
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+      </a-form-model>
+    </j-form-container>
+  </a-spin>
+</template>
+
+<script>
+
+  import { httpAction, getAction } from '@/api/manage'
+  import { validateDuplicateValue } from '@/utils/util'
+
+  export default {
+    name: 'SysUserCompanyForm',
+    components: {
+    },
+    props: {
+      //表单禁用
+      disabled: {
+        type: Boolean,
+        default: false,
+        required: false
+      }
+    },
+    data () {
+      return {
+        model:{
+         },
+        labelCol: {
+          xs: { span: 24 },
+          sm: { span: 5 },
+        },
+        wrapperCol: {
+          xs: { span: 24 },
+          sm: { span: 16 },
+        },
+        confirmLoading: false,
+        validatorRules: {
+           companyName: [
+              { required: true, message: '请输入公司名称!'},
+           ],
+          // yzh: [
+          //   { required: true, message: '请选择是否开始转账权限'},
+          // ],
+           companyCode: [
+              { required: true, message: '请输入公司账号!'},
+           ],
+           password: [
+              { required: true, message: '请输入密码!'},
+           ],
+        },
+        url: {
+          add: "/SysUserCompany/sysUserCompany/add",
+          edit: "/SysUserCompany/sysUserCompany/edit",
+          queryById: "/SysUserCompany/sysUserCompany/queryById"
+        }
+      }
+    },
+    computed: {
+      formDisabled(){
+        return this.disabled
+      },
+    },
+    created () {
+       //备份model原始值
+      this.modelDefault = JSON.parse(JSON.stringify(this.model));
+    },
+    methods: {
+      add () {
+        this.edit(this.modelDefault);
+      },
+      edit (record) {
+        this.model = Object.assign({}, record);
+        this.visible = true;
+      },
+      submitForm () {
+        const that = this;
+        // 触发表单验证
+        this.$refs.form.validate(valid => {
+          if (valid) {
+            that.confirmLoading = true;
+            let httpurl = '';
+            let method = '';
+            if(!this.model.id){
+              httpurl+=this.url.add;
+              method = 'post';
+            }else{
+              httpurl+=this.url.edit;
+               method = 'put';
+            }
+            httpAction(httpurl,this.model,method).then((res)=>{
+              if(res.success){
+                that.$message.success(res.message);
+                that.$emit('ok');
+              }else{
+                that.$message.warning(res.message);
+              }
+            }).finally(() => {
+              that.confirmLoading = false;
+            })
+          }
+
+        })
+      },
+    }
+  }
+</script>

+ 60 - 0
medical_history-vue/src/views/sysusercompany/modules/SysUserCompanyModal.vue

@@ -0,0 +1,60 @@
+<template>
+  <j-modal
+    :title="title"
+    :width="width"
+    :visible="visible"
+    switchFullscreen
+    @ok="handleOk"
+    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
+    @cancel="handleCancel"
+    cancelText="关闭">
+    <sys-user-company-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></sys-user-company-form>
+  </j-modal>
+</template>
+
+<script>
+
+  import SysUserCompanyForm from './SysUserCompanyForm'
+  export default {
+    name: 'SysUserCompanyModal',
+    components: {
+      SysUserCompanyForm
+    },
+    data () {
+      return {
+        title:'',
+        width:800,
+        visible: false,
+        disableSubmit: false
+      }
+    },
+    methods: {
+      add () {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.add();
+        })
+      },
+      edit (record) {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.edit(record);
+        })
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+      },
+      handleOk () {
+        this.$refs.realForm.submitForm();
+      },
+      submitCallback(){
+        this.$emit('ok');
+        this.visible = false;
+      },
+      handleCancel () {
+        this.close()
+      }
+    }
+  }
+</script>

+ 1 - 0
medical_history/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroConfig.java

@@ -102,6 +102,7 @@ public class ShiroConfig {
         filterChainDefinitionMap.put("/sys/getQrcodeToken/**", "anon"); //监听扫码
         filterChainDefinitionMap.put("/sys/checkAuth", "anon"); //授权接口排除
 
+        filterChainDefinitionMap.put("/adminDoctorUser/adminUser/notifyUrl", "anon"); //支付接口回调
 
         filterChainDefinitionMap.put("/", "anon");
         filterChainDefinitionMap.put("/doc.html", "anon");

+ 165 - 1
medical_history/jeecg-boot-module-system/pom.xml

@@ -29,6 +29,19 @@
         </repository>
     </repositories>
 
+    <licenses>
+        <license>
+            <name>MIT License</name>
+            <url>https://www.opensource.org/licenses/mit-license.php</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+
+
+
+
+
     <dependencies>
         <dependency>
             <groupId>com.aliyun</groupId>
@@ -78,10 +91,86 @@
             <artifactId>jimureport-spring-boot-starter</artifactId>
             <version>1.4.32</version>
         </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+            <version>1.7.36</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.logging.log4j</groupId>
+            <artifactId>log4j-api</artifactId>
+            <version>2.18.0</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.logging.log4j</groupId>
+            <artifactId>log4j-core</artifactId>
+            <version>2.18.0</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.httpcomponents</groupId>
+            <artifactId>httpclient</artifactId>
+            <version>4.5.13</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>commons-codec</groupId>
+                    <artifactId>commons-codec</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+
+        <dependency>
+            <groupId>commons-codec</groupId>
+            <artifactId>commons-codec</artifactId>
+            <version>1.13</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
+            <version>1.18.4</version>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>com.google.code.gson</groupId>
+            <artifactId>gson</artifactId>
+            <version>2.8.9</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.yaml</groupId>
+            <artifactId>snakeyaml</artifactId>
+            <version>1.31</version>
+        </dependency>
+
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>RELEASE</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.bouncycastle</groupId>
+            <artifactId>bcprov-jdk15on</artifactId>
+            <version>1.67</version>
+        </dependency>
 
 
     </dependencies>
 
+    <distributionManagement>
+        <snapshotRepository>
+            <id>ossrh</id>
+            <url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
+        </snapshotRepository>
+        <repository>
+            <id>ossrh</id>
+            <url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
+        </repository>
+    </distributionManagement>
+
     <build>
         <plugins>
             <plugin>
@@ -107,6 +196,81 @@
                 <!--					</execution>-->
                 <!--				</executions>-->
             </plugin>
+            <plugin>
+                <groupId>org.sonatype.plugins</groupId>
+                <artifactId>nexus-staging-maven-plugin</artifactId>
+                <version>1.6.7</version>
+                <extensions>true</extensions>
+                <configuration>
+                    <serverId>ossrh</serverId>
+                    <nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
+                    <autoReleaseAfterClose>true</autoReleaseAfterClose>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-surefire-plugin</artifactId>
+                <version>2.5</version>
+                <configuration>
+                    <skipTests>true</skipTests>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <configuration>
+                    <source>8</source>
+                    <target>8</target>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-source-plugin</artifactId>
+                <version>2.2.1</version>
+                <executions>
+                    <execution>
+                        <id>attach-sources</id>
+                        <goals>
+                            <goal>jar-no-fork</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-javadoc-plugin</artifactId>
+                <version>2.9.1</version>
+                <executions>
+                    <execution>
+                        <id>attach-javadocs</id>
+                        <goals>
+                            <goal>jar</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-gpg-plugin</artifactId>
+                <version>1.5</version>
+                <executions>
+                    <execution>
+                        <id>sign-artifacts</id>
+                        <phase>verify</phase>
+                        <goals>
+                            <goal>sign</goal>
+                        </goals>
+<!--                              <configuration>-->
+<!--                                  <keyname>${gpg.keyname}</keyname>-->
+<!--                                  <passphraseServerId>${gpg.keyname}</passphraseServerId>-->
+<!--                              </configuration>-->
+                    </execution>
+                </executions>
+            </plugin>
         </plugins>
     </build>
     <!--	<build>-->
@@ -121,4 +285,4 @@
     <!--			</plugin>-->
     <!--		</plugins>-->
     <!--	</build>-->
-</project>
+</project>

+ 27 - 10
medical_history/jeecg-boot-module-system/src/main/java/org/jeecg/modules/adminuser/controller/AdminDoctorUserController.java

@@ -1,25 +1,27 @@
 package org.jeecg.modules.adminuser.controller;
 
-import java.math.BigDecimal;
 import java.util.Arrays;
 import java.util.List;
 import java.util.Map;
-import java.util.UUID;
-import java.util.stream.Collectors;
 import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import java.net.URLDecoder;
+import java.util.UUID;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
+import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import lombok.Data;
+import org.apache.catalina.User;
 import org.apache.shiro.SecurityUtils;
 import org.jeecg.common.api.vo.Result;
 import org.jeecg.common.system.query.QueryGenerator;
+import org.jeecg.common.system.util.JwtUtil;
 import org.jeecg.common.system.vo.LoginUser;
 import org.jeecg.common.util.PasswordUtil;
 import org.jeecg.common.util.oConvertUtils;
-import org.jeecg.modules.adminuser.entity.AdminUser;
+import org.jeecg.config.shiro.ShiroRealm;
+import org.jeecg.modules.adminuser.entity.*;
+import org.jeecg.modules.adminuser.service.IAdminTransferAccountsService;
 import org.jeecg.modules.adminuser.service.IAdminUserService;
 
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@@ -31,17 +33,14 @@ import org.jeecg.modules.system.entity.SysUser;
 import org.jeecg.modules.system.service.ISysUserService;
 import org.jeecg.modules.system.util.SecurityUtil;
 import org.jeecgframework.poi.excel.ExcelImportUtil;
-import org.jeecgframework.poi.excel.def.NormalExcelConstants;
-import org.jeecgframework.poi.excel.entity.ExportParams;
 import org.jeecgframework.poi.excel.entity.ImportParams;
-import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
 import org.jeecg.common.system.base.controller.JeecgController;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Primary;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.multipart.MultipartFile;
 import org.springframework.web.multipart.MultipartHttpServletRequest;
 import org.springframework.web.servlet.ModelAndView;
-import com.alibaba.fastjson.JSON;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.jeecg.common.aspect.annotation.AutoLog;
@@ -61,6 +60,8 @@ public class AdminDoctorUserController extends JeecgController<AdminUser, IAdmin
     private IAdminUserService adminUserService;
     @Autowired
     private ISysUserService sysUserService;
+    @Autowired
+    private IAdminTransferAccountsService adminTransferAccountsService;
 
     /**
      * 分页列表查询
@@ -282,6 +283,22 @@ public class AdminDoctorUserController extends JeecgController<AdminUser, IAdmin
         return adminUserService.giveMoney(adminUser);
     }
 
+    @ApiOperation(value = "支付回调接口", notes = "支付回调接口")
+    @PostMapping(value = "notifyUrl")
+    public String  notifyUrl(@RequestHeader("dealer-id") String dealerId,
+                               @RequestHeader("request-id") String requestId,
+                               @RequestParam(name = "data", required = true) String data,
+                               @RequestParam(name = "mess", required = true) String mess,
+                               @RequestParam(name = "timestamp", required = true) String timestamp,
+                               @RequestParam(name = "sign", required = true) String sign,
+                               @RequestParam(name = "sign_type", required = true) String sign_type,
+                               HttpServletRequest request) {
+        return adminTransferAccountsService.notifyUrl(requestId,data,mess,timestamp,sign,sign_type);
+
+
+
+    }
+
 
 
 

+ 82 - 0
medical_history/jeecg-boot-module-system/src/main/java/org/jeecg/modules/adminuser/entity/AdminTransferAccounts.java

@@ -79,4 +79,86 @@ public class AdminTransferAccounts implements Serializable {
     @Excel(name = "结果信息", width = 15)
     @ApiModelProperty(value = "结果信息")
     private String resultsMess;
+
+
+    // 平台企业订单号
+//    private String orderId;
+
+    // 订单金额
+    private String pay;
+
+    // 综合服务主体 ID
+    private String brokerId;
+
+    // 平台企业 ID
+    private String dealerId;
+
+    // 姓名
+    private String realName;
+
+    // 收款人账号
+    private String cardNo;
+
+    // 身份证号码
+    private String idCard;
+
+    // 手机号
+    private String phoneNo;
+
+    // 订单状态码
+    private String status;
+
+    // 订单详细状态码
+    private String statusDetail;
+
+    // 订单状态码描述
+    private String statusMessage;
+
+    // 订单详细状态码描述
+    private String statusDetailMessage;
+
+    // 综合服务主体支付金额
+    private String brokerAmount;
+
+    // 综合服务平台流水号
+    private String ref;
+
+    // 支付交易流水号
+    private String brokerBankBill;
+
+    // 支付路径
+    private String withdrawPlatform;
+
+    // 订单接收时间,精确到秒
+    private String createdAt;
+
+    // 订单完成时间,精确到秒
+    private String finishedTime;
+
+    // 综合服务主体加成服务费
+    private String brokerFee;
+
+    // 余额账户支出加成服务费
+    private String brokerRealFee;
+
+    // 抵扣账户支出加成服务费
+    private String brokerDeductFee;
+
+    // 订单备注
+    private String payRemark;
+
+    // 用户加成服务费
+    private String userFee;
+
+    // 银行名称
+    private String bankName;
+
+    // 项目标识
+    private String projectId;
+
+    // 平台企业用户 ID
+    private String userId;
+
+    private String notifyId;
+    private String notifyTime;
 }

+ 1 - 0
medical_history/jeecg-boot-module-system/src/main/java/org/jeecg/modules/adminuser/service/IAdminTransferAccountsService.java

@@ -11,4 +11,5 @@ import com.baomidou.mybatisplus.extension.service.IService;
  */
 public interface IAdminTransferAccountsService extends IService<AdminTransferAccounts> {
 
+    String notifyUrl(String requestId, String data, String mess, String timestamp, String sign, String sign_type);
 }

+ 65 - 0
medical_history/jeecg-boot-module-system/src/main/java/org/jeecg/modules/adminuser/service/impl/AdminTransferAccountsServiceImpl.java

@@ -1,8 +1,18 @@
 package org.jeecg.modules.adminuser.service.impl;
 
+import org.checkerframework.checker.units.qual.A;
 import org.jeecg.modules.adminuser.entity.AdminTransferAccounts;
 import org.jeecg.modules.adminuser.mapper.AdminTransferAccountsMapper;
 import org.jeecg.modules.adminuser.service.IAdminTransferAccountsService;
+import org.jeecg.modules.pay.example.config.Config;
+import org.jeecg.modules.pay.sdk.base.YzhConfig;
+import org.jeecg.modules.pay.sdk.notify.NotifyClient;
+import org.jeecg.modules.pay.sdk.notify.domain.NotifyRequest;
+import org.jeecg.modules.pay.sdk.notify.domain.NotifyResponse;
+import org.jeecg.modules.pay.sdk.payment.domain.NotifyOrderData;
+import org.jeecg.modules.pay.sdk.payment.domain.NotifyOrderRequest;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@@ -16,4 +26,59 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 @Service
 public class AdminTransferAccountsServiceImpl extends ServiceImpl<AdminTransferAccountsMapper, AdminTransferAccounts> implements IAdminTransferAccountsService {
 
+    @Autowired
+    private IAdminTransferAccountsService adminTransferAccountsService;
+
+    private static YzhConfig config = Config.getYzhConfig();
+
+    private static NotifyClient client = new NotifyClient(config);
+
+    @Override
+    public String notifyUrl(String requestId, String data, String mess, String timestamp, String sign, String sign_type) {
+        NotifyRequest request = new NotifyRequest();
+        request.setData(data);
+        request.setMess(mess);
+        request.setSign(sign);
+        request.setTimestamp(timestamp);
+
+        try {
+            // 订单支付状态回调通知
+            NotifyResponse<NotifyOrderRequest> response = client.notifyDecoder(request, NotifyOrderRequest.class);
+            NotifyOrderRequest notifyRequest = response.getData();
+            NotifyOrderData notifyOrderData = notifyRequest.getData();
+            AdminTransferAccounts adminTransferAccounts = new AdminTransferAccounts();
+            adminTransferAccounts.setOrderId(notifyOrderData.getOrderId());
+            adminTransferAccounts.setPay(notifyOrderData.getPay());
+            adminTransferAccounts.setBrokerId(notifyOrderData.getBrokerId());
+            adminTransferAccounts.setDealerId(notifyOrderData.getDealerId());
+            adminTransferAccounts.setRealName(notifyOrderData.getRealName());
+            adminTransferAccounts.setCardNo(notifyOrderData.getCardNo());
+            adminTransferAccounts.setIdCard(notifyOrderData.getIdCard());
+            adminTransferAccounts.setPhoneNo(notifyOrderData.getPhoneNo());
+            adminTransferAccounts.setStatus(notifyOrderData.getStatus());
+            adminTransferAccounts.setStatusDetail(notifyOrderData.getStatusDetail());
+            adminTransferAccounts.setStatusMessage(notifyOrderData.getStatusMessage());
+            adminTransferAccounts.setStatusDetailMessage(notifyOrderData.getStatusDetailMessage());
+            adminTransferAccounts.setBrokerAmount(notifyOrderData.getBrokerAmount());
+            adminTransferAccounts.setRef(notifyOrderData.getRef());
+            adminTransferAccounts.setBrokerBankBill(notifyOrderData.getBrokerBankBill());
+            adminTransferAccounts.setWithdrawPlatform(notifyOrderData.getWithdrawPlatform());
+            adminTransferAccounts.setCreatedAt(notifyOrderData.getCreatedAt());
+            adminTransferAccounts.setFinishedTime(notifyOrderData.getFinishedTime());
+            adminTransferAccounts.setBrokerFee(notifyOrderData.getBrokerFee());
+            adminTransferAccounts.setBrokerDeductFee(notifyOrderData.getBrokerDeductFee());
+            adminTransferAccounts.setPayRemark(notifyOrderData.getPayRemark());
+            adminTransferAccounts.setUserFee(notifyOrderData.getUserFee());
+            adminTransferAccounts.setBankName(notifyOrderData.getBankName());
+            adminTransferAccounts.setProjectId(notifyOrderData.getProjectId());
+            adminTransferAccounts.setUserId(notifyOrderData.getUserId());
+            adminTransferAccounts.setNotifyId(notifyRequest.getNotifyId());
+            adminTransferAccounts.setNotifyTime(notifyRequest.getNotifyTime());
+            adminTransferAccountsService.save(adminTransferAccounts);
+            return "success";
+        } catch (Exception e) {
+            return "error";
+        }
+
+    }
 }

+ 6 - 25
medical_history/jeecg-boot-module-system/src/main/java/org/jeecg/modules/adminuser/service/impl/AdminUserServiceImpl.java

@@ -132,7 +132,6 @@ public class AdminUserServiceImpl extends ServiceImpl<AdminUserMapper, AdminUser
         Random random = new Random();
         int randomNumber = random.nextInt(900000) + 100000;
         request.setOrderId("BL"+format+randomNumber);
-        System.out.println(request.getOrderId());
         request.setDealerId(dealer_id);
         request.setBrokerId(broker_id);
         request.setRealName(adminUser.getName());
@@ -141,40 +140,22 @@ public class AdminUserServiceImpl extends ServiceImpl<AdminUserMapper, AdminUser
         request.setIdCard(adminUser.getCard());
         request.setPay(String.valueOf(adminUser1.getMoney()));
         request.setPayRemark(adminUser1.getNotes());
-        request.setNotifyUrl("");
+        request.setNotifyUrl("http://59.110.230.108:10001/adminDoctorUser/adminUser/notifyUrl");
         YzhResponse<CreateBankpayOrderResponse> response = null;
         try {
+            String requestId = BaseUtil.getRandomStr("requestId");
             // request-id:每次请求的唯一标识
             // 强烈建议平台企业自定义 request-id 并记录在日志中,如遇异常请求,便于使用 request-id 追踪问题
             // 如未自定义则使用 SDK 中的 UUID 方法自动生成,注意:UUID 方法不能保证全局唯一,可能会出现 ID 重复,推荐自行实现全局唯一 ID
-            response = clientPay.createBankpayOrder(YzhRequest.build(BaseUtil.getRandomStr("requestId"), request));
+            response = clientPay.createBankpayOrder(YzhRequest.build(requestId, request));
             if (response.isSuccess()) {// 请求成功
                 CreateBankpayOrderResponse data = response.getData();
-                AdminTransferAccounts adminTransferAccounts = new AdminTransferAccounts();
-                adminTransferAccounts.setOrderId(request.getOrderId());
-                adminTransferAccounts.setTransferCode(request.getCardNo());
-                adminTransferAccounts.setTransferDoctor(request.getRealName());
-                adminTransferAccounts.setTransferMoney(adminUser1.getMoney());
-                adminTransferAccounts.setTransferNotes(request.getPayRemark());
-                adminTransferAccounts.setTransferResults("1");
-                adminTransferAccounts.setResultsMess("转账成功");
-                adminTransferAccountsMapper.insert(adminTransferAccounts);
-
-
-                System.out.println("请求成功:" + data);
-                return Result.ok("请求成功:" + data);
+                baseCommonService.addLog("请求成功转账的唯一标识request-id: " + requestId+"", CommonConstant.LOG_TYPE_2, 2);
+                return Result.ok("请求成功:转账金额"+request.getPay());
             } else {
                 System.out.println("HTTP Status Code:" + response.getHttpCode());
                 System.out.println("发生异常:" + response.getCode() + "-" + response.getMessage());
-                AdminTransferAccounts adminTransferAccounts = new AdminTransferAccounts();
-                adminTransferAccounts.setOrderId(request.getOrderId());
-                adminTransferAccounts.setTransferCode(request.getCardNo());
-                adminTransferAccounts.setTransferDoctor(request.getRealName());
-                adminTransferAccounts.setTransferMoney(adminUser1.getMoney());
-                adminTransferAccounts.setTransferNotes(request.getPayRemark());
-                adminTransferAccounts.setTransferResults("0");
-                adminTransferAccounts.setResultsMess(response.getCode() + "-" + response.getMessage());
-                adminTransferAccountsMapper.insert(adminTransferAccounts);
+                baseCommonService.addLog("发生异常转账的唯一标识request-id: " + requestId+ response.getCode() + "-" + response.getMessage(), CommonConstant.LOG_TYPE_2, 2);
                 return Result.error( response.getCode() + "-" + response.getMessage());
             }
         } catch (Exception e) {

+ 3 - 0
medical_history/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/entity/SysUser.java

@@ -182,4 +182,7 @@ public class SysUser implements Serializable {
 
     /**设备id uniapp推送用*/
     private String clientId;
+
+    /**设备id uniapp推送用*/
+    private String yzh;
 }

+ 5 - 0
medical_history/jeecg-boot-module-system/src/main/java/org/jeecg/modules/sysusercompany/entity/SysUserCompany.java

@@ -54,6 +54,11 @@ public class SysUserCompany implements Serializable {
 	@Excel(name = "公司名称", width = 15)
     @ApiModelProperty(value = "公司名称")
     private String companyName;
+    /**云账户权限*/
+    @Excel(name = "云账户权限", width = 15)
+    @ApiModelProperty(value = "云账户权限")
+    @Dict(dicCode = "yzh_auth")
+    private String yzh;
 	/**公司编码*/
 	@Excel(name = "公司编码", width = 15)
     @ApiModelProperty(value = "公司编码")

+ 4 - 0
medical_history/jeecg-boot-module-system/src/main/java/org/jeecg/modules/sysusercompany/service/impl/SysUserCompanyServiceImpl.java

@@ -40,6 +40,7 @@ public class SysUserCompanyServiceImpl extends ServiceImpl<SysUserCompanyMapper,
         String companyName = sysUserCompany.getCompanyName();
         String companyCode = sysUserCompany.getCompanyCode();
         String password = sysUserCompany.getPassword();
+        String yzh = sysUserCompany.getYzh();
 
 
         SysUser user = new SysUser();
@@ -54,6 +55,7 @@ public class SysUserCompanyServiceImpl extends ServiceImpl<SysUserCompanyMapper,
         String passwordEncode = PasswordUtil.encrypt(companyCode, password, salt);
         user.setPassword(passwordEncode);
         user.setStatus(1);
+        user.setYzh(yzh);
         user.setDelFlag(CommonConstant.DEL_FLAG_0);
 
 
@@ -80,6 +82,7 @@ public class SysUserCompanyServiceImpl extends ServiceImpl<SysUserCompanyMapper,
         String companyName = sysUserCompany.getCompanyName();
         String companyCode = sysUserCompany.getCompanyCode();
         String password = sysUserCompany.getPassword();
+        String yzh = sysUserCompany.getYzh();
 
         String id = sysUserCompany.getId();
         SysUserCompany byId = this.getById(id);
@@ -94,6 +97,7 @@ public class SysUserCompanyServiceImpl extends ServiceImpl<SysUserCompanyMapper,
         sysUserCompany.setCompanyName(companyName);
         sysUserCompany.setCompanyCode(companyCode);
 
+        user.setYzh(yzh);
         user.setRealname(companyName);
         user.setUsername(companyCode);
         user.setPassword(passwordEncode);

+ 3 - 1
medical_history/jeecg-boot-module-system/src/main/resources/application-dev.yml

@@ -378,4 +378,6 @@ yzh:
   # 平台企业私钥。暂不支持以 -----BEGIN PRIVATE KEY----- 开头和以 -----END PRIVATE KEY----- 结尾的 PEM 格式。如密钥为 PEM 格式,需先删除头部的 -----BEGIN PRIVATE KEY-----、尾部的 -----END PRIVATE KEY----- 和密钥中的换行符
   rsa_private_key: MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC8ZFNVbWSrf662KbObnCHAwPZ7QRIOnkY+OI9aEAUvC4cN+4TCMfE+muoYv6OWf4Ge36Ll0Y6IGGP69iYHBqfgibyBRGQdN8tBl/bNfWXdmW9rftEd5+Ci9B78zCADWEe711DorBr5JrVMZCPzxjBuvI9gdow2VrB/19NN9HGa2E8wzKpq49LwTra+GpdHMLWSug/YUEWI6FE6ptd96DD41kUJPV8ap0+mmDzDT/VGtk+G/XilQ7tbhfJxkzvzf/8OUy4dE7fqMc4yHPjubmzJwhqIey6jSS1n+dfaKtzgTLBQ0F21M5GV9Dco63P8AmnnMCchS3UnqPCJ4bmzULnrAgMBAAECggEAXVumRFZSpf4/OTyPKhUEUP4O52OGrEHY82qZ93qq5vZidhZnYsjXETw5uAv36FPFi1Kt6g+f/2d+3FXw4Fh3BvmatcCLkEMe8aF6B7kVquwnX/DXdmd7VaV+Wa5aSu4LllWMXdE0CLYa8AFMI7jaNXYx4w68Sw1IqAHvT9lMFvwyqt9/OivCRu2KYR9LTUe6tHuINwTAfx7twUCir2j0/hjqkCN1Pls+coI3gqKa1qbcIiVj3lYUHyNyH/5UajTVaEpgKI1Z+LTxkTPWwb905G0bgkL9PIouFCYSG/OEhs0fM1/109X4lbVbwCBH8/il2aLput3O8bFdQZmYb6efOQKBgQDpV/gwBNYAsZyQt9XWawR+5pn7fUws/z1RXGfcEBrxfdMMb9cW7m/hurPQAoXeDqi4Ukq2c1TAScQDj7YJYSux1dKS/fCnW/eUSSYgBSmu7dzjGQnt/g2wfNG4eQCX0n1XGb+roXC2WURwA4Ylvj0UjlH2ko2eW6mkFavKMQrEdQKBgQDOrwcdURo3h5Y57jKu7kNHIyIpsm7mUcEINNcRT3T5/u9SCR45l3A3anjeMPrrR6WlUsgasa2BTHxQE/Qp97JBl9G8q41E9T6ZTYqxG5rAHUHQE7m+dDEqNnkM2P1uKJ8BTjcAww3GuK/MRhWOx/5fYRtk+FbU/uZn9tMs6V443wKBgQC+PYlL5PVwlV2XIzoE2TVOHMXXorzTRrkANz05ziuZTUMetaP/vx+aQnRNF3F6rCrkM7tT6s1jBAD6AlWgageMsk4+pyhn2fQMgmLB4lOsmaLnx8cvsFwK0ojNRGG2Zdboh0acMD/LexXv2P+qj+IOe0XZqHwraoHxE/X+H2Ou7QKBgClXf0/Q6jKTT2xVBhRRmml/UJUQmPg/ACKZFy/iOd7LrKk3I7GXZh3fkT+4gmhPk4WnMlmMks0bNH58D0nZvvE54f0gP4i8mYHmrchRYjntYD2zxGKhMThlXv8/5CmFvJBxSbVATuAiDyAIIMXHoU0Iyob+2bePKR1AlOsV3v/3AoGBALdazJWQTUNrVNs9p6cyWAOnXadM77tivQFPXCCYsmAbAUANlO2fLsMhkSe6sUAIJv98iRzCDzNixmS23e73wqKpENFv6dipl9b8q7vALVe+DudddxxXSkQkhHRYuhvP8I1A6y8XJhc3jHCpMfsS48d+TU6593qdedIrOKK+1PFK
   # 云账户公钥。暂不支持以 -----BEGIN PUBLIC KEY----- 开头和以 -----END PUBLIC KEY----- 结尾的 PEM 格式。如密钥为 PEM 格式,需先删除头部的 -----BEGIN PUBLIC KEY-----、尾部的 -----END PUBLIC KEY----- 和密钥中的换行符
-  rsa_public_key: MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvGRTVW1kq3+utimzm5whwMD2e0ESDp5GPjiPWhAFLwuHDfuEwjHxPprqGL+jln+Bnt+i5dGOiBhj+vYmBwan4Im8gURkHTfLQZf2zX1l3Zlva37RHefgovQe/MwgA1hHu9dQ6Kwa+Sa1TGQj88YwbryPYHaMNlawf9fTTfRxmthPMMyqauPS8E62vhqXRzC1kroP2FBFiOhROqbXfegw+NZFCT1fGqdPppg8w0/1RrZPhv14pUO7W4XycZM783//DlMuHRO36jHOMhz47m5sycIaiHsuo0ktZ/nX2irc4EywUNBdtTORlfQ3KOtz/AJp5zAnIUt1J6jwieG5s1C56wIDAQAB
+#  rsa_public_key: MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvGRTVW1kq3+utimzm5whwMD2e0ESDp5GPjiPWhAFLwuHDfuEwjHxPprqGL+jln+Bnt+i5dGOiBhj+vYmBwan4Im8gURkHTfLQZf2zX1l3Zlva37RHefgovQe/MwgA1hHu9dQ6Kwa+Sa1TGQj88YwbryPYHaMNlawf9fTTfRxmthPMMyqauPS8E62vhqXRzC1kroP2FBFiOhROqbXfegw+NZFCT1fGqdPppg8w0/1RrZPhv14pUO7W4XycZM783//DlMuHRO36jHOMhz47m5sycIaiHsuo0ktZ/nX2irc4EywUNBdtTORlfQ3KOtz/AJp5zAnIUt1J6jwieG5s1C56wIDAQAB
+  rsa_public_key: MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDTj9YQ1H51L0IWV6mHa5TasGV7PF1VJu8RniVcGYkcvsyP+d5WzD5UT0BOC8kEJARaPvGTkCnfM36HKtnMHGhb4PIHUc12qb9LN030XQwZBRXGDbODq2m4gXii4dFWgBSg24eBCMAV0ZOuJayNB9M33GjLhXs1FQI2v4sZ0pqLwQIDAQAB
+

+ 1 - 1
medical_history/jeecg-boot-module-system/src/main/resources/jeecg/jeecg_config.properties

@@ -1,5 +1,5 @@
 #code_generate_project_path
-project_path=E:\\eclipse2018-workspace\\jeecg-boot
+project_path=D\\eclipse2018-workspace\\jeecg-boot
 #bussi_package[User defined]
 bussi_package=org.jeecg.modules.demo
 

+ 2 - 2
medical_history/pom.xml

@@ -4,7 +4,7 @@
   <artifactId>jeecg-boot-parent</artifactId>
   <version>3.1.0</version>
   <packaging>pom</packaging>
-  
+
   	<parent>
 	    <groupId>org.springframework.boot</groupId>
 	    <artifactId>spring-boot-starter-parent</artifactId>
@@ -435,4 +435,4 @@
             </properties>
         </profile>
     </profiles>
-</project>
+</project>