Browse Source

开票调整,放行记录查询调整

lzm 2 years ago
parent
commit
96a163d8b4

+ 9 - 0
sp-admin/sa-view/tb-business-car/tb-business-car-list.html

@@ -68,6 +68,14 @@
 							start-placeholder="开始日期" end-placeholder="结束日期">
 						</el-date-picker>
 					</div>
+					<div class="c-item" style="width: 120px;">
+						<label class="c-label">是否计费:</label>
+						<el-select v-model="p.isFree" placeholder="请选择">
+							<el-option label="-全部-" value=""> </el-option>
+							<el-option label="业务车" value="0"> </el-option>
+							<el-option label="免费车" value="1"> </el-option>
+						</el-select>
+					</div>
 					<el-button type="primary" icon="el-icon-search" @click="p.pageNo = 1; f5()">查询</el-button>
 					<el-button size="mini" type="primary" @click="exportFn" v-if="sa.isAuth('tb-business-car-export')">导出</el-button>
 					<el-button size="mini" type="info" @click="sa.f5()">重置</el-button>
@@ -146,6 +154,7 @@
 						payType: '',
 						leaveStart: '',
 						leaveEnd: '',
+						isFree: '',
 						pageNo: 1, // 当前页 
 						pageSize: 10, // 页大小 
 						sortType: 10 // 排序方式

+ 1 - 1
sp-admin/sa-view/tb-invoice-info/tb-invoice-info-list.html

@@ -50,7 +50,7 @@
 					<sa-td name="客户名称" prop="customerName" ></sa-td>
 					<sa-td name="账单金额" prop="totalMoney" ></sa-td>
 					<sa-td name="开票状态" prop="status" type="enum" :jv="{0: '未开票', 1: '已开票'}"></sa-td>
-					<sa-td name="开票种类" prop="isElec" type="enum" :jv="{0: '纸质发票', 1: '电子发票'}"></sa-td>
+					<sa-td name="开票种类" prop="isElec" type="enum" :jv="{0: '纸质普票', 1: '电子普票', 2:'纸质专票'}"></sa-td>
 					<sa-td name="开票时间" prop="invoiceTime" ></sa-td>
 					<sa-td name="发票号" prop="invoiceNo" width="150"></sa-td>
 					<el-table-column label="主体名称">

+ 1 - 3
sp-admin/sa-view/tb-invoice-order/tb-invoice-order-info.html

@@ -24,8 +24,6 @@
 				<div class="c-panel">
 					<el-form v-if="m">
 						<sa-info name="主键" br>{{m.id}}</sa-info>
-						<sa-info name="客户id" br>{{m.customerId}}</sa-info>
-						<sa-info name="业务订单id" br>{{m.businessId}}</sa-info>
 						<sa-info name="业务名称" br>{{m.businessName}}</sa-info>
 						<sa-info name="业务订单号" br>{{m.businessNo}}</sa-info>
 						<sa-info name="微信支付订单号" br>{{m.transactionId}}</sa-info>
@@ -34,7 +32,7 @@
 						<sa-info type="enum" name="开票状态" :value="m.status" :jv="{0: '未申请', 1: '已申请', 2: '已开票'}" br></sa-info>
 						<sa-info name="开票时间" br>{{m.invoiceTime}}</sa-info>
 						<sa-info name="创建时间" br>{{m.createTime}}</sa-info>
-						<sa-info name="开票信息id" br>{{m.infoId}}</sa-info>
+
 					</el-form>
 				</div>
 			</div>

+ 7 - 11
sp-admin/sa-view/tb-invoice-order/tb-invoice-order-list.html

@@ -81,7 +81,7 @@
 			</div>
 			<el-dialog title="申请开票" :visible.sync="applyDate.visible" width="38%">
 				<sa-item name="发票总额" v-model="applyDate.form.totalMoney" type="num" :disabled="true"></sa-item>
-				<sa-item name="电子发票" v-model="applyDate.form.isElec" type="enum" :jv="{1: '是', 0: '否'}"></sa-item>
+				<sa-item name="开票种类" v-model="applyDate.form.isElec" type="enum" :jv="{1: '电子普票', 0: '纸质普票', 2:'纸质专票'}"></sa-item>
 				<div class="c-item">
 					<label class="c-label">开票主体:</label>
 					<el-select v-model="applyDate.form.entityId" placeholder="请选择" filterable @change="changeEntity">
@@ -97,7 +97,7 @@
 				<sa-item type="text" name="开户银行" v-model="applyDate.entity.bank" :disabled="true"></sa-item>
 				<sa-item type="text" name="银行账号" v-model="applyDate.entity.bankNo" :disabled="true"></sa-item>
 				<span slot="footer" class="dialog-footer">
-					<el-button @click="emodel.visible = false">取 消</el-button>
+					<el-button @click="applyDate.visible = false">取 消</el-button>
 					<el-button type="primary" @click="apply">确 定</el-button>
 				</span>
 			</el-dialog>
@@ -162,10 +162,10 @@
 						if(selection.length == 0) {
 							return sa.msg('请至少选择一条数据')
 						}
-						var ids = sa.getArrayField(selection, 'id');
-						for(var i=0; i<ids.length; i++){
-							if(this.dataList[i].status == 1){
-								return sa.msg('请选择未开票的订单')
+						let ids = sa.getArrayField(selection, 'id');
+						for(var i=0; i<selection.length; i++){
+							if(selection[i].status == 1 || selection[i].status == 2){
+								return sa.msg('请选择待申请的订单')
 							}
 						}
 						let billMoneys = sa.getArrayField(selection, 'billMoney');
@@ -193,11 +193,7 @@
 							this.currentCustomerName = resp.data.name;
 							this.applyDate.form.customerId = resp.data.id;
 							this.applyDate.form.customerName = resp.data.name;
-							console.log(resp.data)
-							console.log(this.currentCustomerId)
-							console.log(this.currentCustomerName)
-							console.log(this.applyDate.form.customerId)
-							console.log(this.applyDate.form.customerName)
+
 						}.bind(this));
 					},
 					// 刷新

+ 6 - 0
sp-server/src/main/java/com/pj/project/tb_business_car/TbBusinessCarMapper.xml

@@ -75,6 +75,12 @@
             <if test="color =='其他'">
                 and (color='' or color ='未知' or color is null)
             </if>
+            <if test="isFree==0">
+                and car_no not in (SELECT card_no FROM tb_car)
+            </if>
+            <if test="isFree==1">
+                and car_no in (SELECT card_no FROM tb_car)
+            </if>
         </where>
         order by
         <choose>

+ 1 - 1
sp-server/src/main/java/com/pj/project/tb_invoice_info/TbInvoiceInfo.java

@@ -65,7 +65,7 @@ public class TbInvoiceInfo implements Serializable {
     private Integer status;
 
     /**
-     * 电子发票(0=否,1=是)
+     * 电子发票(0=纸质普票,1=电子普票,2=纸质专票)
      */
     private String isElec;
 

+ 28 - 0
sp-server/src/main/java/com/pj/project/tb_invoice_info/TbInvoiceInfoService.java

@@ -7,16 +7,22 @@ import java.util.Arrays;
 import java.util.Date;
 import java.util.List;
 
+import cn.hutool.core.date.DateUtil;
 import cn.hutool.core.util.RandomUtil;
 import cn.hutool.core.util.StrUtil;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.pj.api.wx.bo.MsgDataBO;
+import com.pj.api.wx.service.WxService;
+import com.pj.current.config.WxConfig;
 import com.pj.project.tb_entity.TbEntity;
 import com.pj.project.tb_entity.TbEntityService;
 import com.pj.project.tb_fee_details.TbFeeDetails;
 import com.pj.project.tb_fee_details.TbFeeDetailsService;
 import com.pj.project.tb_invoice_order.TbInvoiceOrder;
 import com.pj.project.tb_invoice_order.TbInvoiceOrderService;
+import com.pj.project4sp.admin.SpAdmin;
+import com.pj.project4sp.admin.SpAdminService;
 import com.pj.utils.so.SoMap;
 import org.springframework.stereotype.Service;
 
@@ -42,6 +48,12 @@ public class TbInvoiceInfoService extends ServiceImpl<TbInvoiceInfoMapper, TbInv
     TbEntityService tbEntityService;
     @Resource
     TbFeeDetailsService tbFeeDetailsService;
+    @Resource
+    SpAdminService spAdminService;
+    @Resource
+    WxService wxService;
+    @Resource
+    WxConfig wxConfig;
 
 
 	/** 增 */
@@ -128,6 +140,22 @@ public class TbInvoiceInfoService extends ServiceImpl<TbInvoiceInfoMapper, TbInv
             invoiceOrder.setStatus(2).setInvoiceTime(new Date());
         }
         tbInvoiceOrderService.updateBatchById(invoiceOrderList);
+        /*
+        List<SpAdmin> spAdminList = spAdminService.findByCustomerId(t.getCustomerId());
+        String remark = "";
+        if(StrUtil.equals("1", t.getIsElec())){
+            remark = "请查看邮箱" + t.getEmail() + "获取发票";
+        }else{
+            remark = "请联系运营人员获取发票";
+        }
+        MsgDataBO msgDataBO = new MsgDataBO("你有一张新票据", t.getInvoiceNo(),
+                DateUtil.now(),
+                "广西东兴北投口岸投资有限公司",
+                t.getEntityName(),t.getTotalMoney().toString(),  remark);
+        spAdminList.stream().map(SpAdmin::getOpenid).forEach(openId -> {
+            wxService.sendTemplateMsg(wxConfig.getInvoiceCompleteTemplate(), openId, msgDataBO, "");
+        });
+        */
     }
 
 }

+ 5 - 3
sp-server/src/main/resources/application-dev.yml

@@ -6,9 +6,9 @@ spring:
     # 数据源配置
     datasource:
         type: com.alibaba.druid.pool.DruidDataSource
-        url: jdbc:mysql://47.101.143.145:3306/pco?useUnicode=true&characterEncoding=utf-8&useSSL=true&serverTimezone=GMT%2B8
+        url: jdbc:mysql://127.0.0.1:3307/pco?useUnicode=true&characterEncoding=utf-8&useSSL=true&serverTimezone=GMT%2B8
         username: root
-        password: 1qaz@WSX
+        password: 1234
         # 是否打开sql监控台  (生产环境请务必关闭此选项)
         druid:
             stat-view-servlet:
@@ -85,4 +85,6 @@ jh-config:
     pay-secret: 85571966fdd14175ae7d81f59f545615
     server-url: https://btpay.bgigc.com
     enable: true
-
+ocr-config:
+    bash: /opt/ocrpic/tesseract.sh
+    analysis: /opt/ocrpic/ocrtxt/PIC_NAME.txt