qzyReal hace 2 años
padre
commit
9d4deae820

+ 1 - 1
app/manifest.json

@@ -85,7 +85,7 @@
     "vueVersion" : "2",
     "h5" : {
         "router" : {
-            "base" : "/h5/",
+            "base" : "/test/",
             "mode" : "history"
         },
         "devServer" : {

+ 1 - 1
app/pages/business-item/item-detail.vue

@@ -28,7 +28,7 @@
 						<text class="p2">{{businessItem.itemName}}</text>
 					</view>
 				</view>
-				<view class="c">
+				<view class="c" v-if="businessItem.cardNo">
 					<view class="item">
 						<text class="p1">越南车:</text>
 						<text class="p2">{{businessItem.cardNo}}</text>

+ 1 - 1
app/pages/business-order/business-item.vue

@@ -28,7 +28,7 @@
 						<text class="p2">{{businessItem.itemName}}</text>
 					</view>
 				</view>
-				<view class="c">
+				<view class="c" v-if="businessItem.cardNo">
 					<view class="item">
 						<text class="p1">越南车:</text>
 						<text class="p2">{{businessItem.cardNo}}</text>

+ 10 - 3
app/pages/wx/pay.vue

@@ -195,13 +195,20 @@
 					openid: this.openid
 				}
 				let type = this.type;
-				let con = 'A1停车费';
+				let con = 'A1-停车费';
 				let tradeType = 'PORT_PARKING_FEE';
 				if (type == 2) {
-					con = 'A1整车业务';
+					con = 'A1-整车业务';
 					tradeType='PORT_OPERATION_FEE';
 				} else if (type == 1) {
-					con = 'A1车辆消杀'
+					let itemSelect=this.itemSelect;
+					console.log(itemSelect)
+					let itemStr=this.item.list
+					.filter(obj=>itemSelect.indexOf(obj.id)!==-1).map(obj=>obj.name)
+					.join('、');
+					console.log(itemStr)
+					con = 'A1-'+itemStr;
+					tradeType='PORT_OPERATION_FEE';
 				}
 				p.desc = con + '-' + carNos;
 				p.businessType=tradeType;

+ 1 - 1
app/pages/wx/payOrder.vue

@@ -156,7 +156,7 @@
 					tradeType: "JSAPI",
 					openid: this.wx.openid
 				}
-				p.desc = "A1-业务费用";
+				p.desc = "A1-整车业务";
 				p.businessType='PORT_OPERATION_FEE';
 				this.$api.getPrePay(this.$common.removeNull(p)).then(resp => {
 					let data = resp.data;

+ 2 - 2
app/utils/request.js

@@ -1,5 +1,5 @@
-const server = 'http://127.0.0.1:8099/pro';
-// const server = 'https://pco.aseanbusiness.cn/pro';
+// const server = 'http://127.0.0.1:8099/pro';
+const server = 'https://pco.aseanbusiness.cn/pro';
 // const server = 'https://dxkaa1.bgigc.com/pro';
 
 import common from '../common/js/common.js';

+ 1 - 1
sp-admin/sa-view/tb-item-type/tb-item.html

@@ -168,7 +168,7 @@
 					// 删除
 					del: function(data) {
 						sa.confirm('是否移除出该收费项?', function() {
-							sa.ajax('/RelationTypeItem/delete?id=' + data.id, function(res) {
+							sa.ajax('/RelationTypeItem/delete?id=' + data.id+'&typeId='+data.typeId, function(res) {
 								sa.arrayDelete(this.dataList, data);
 								sa.ok('删除成功');
 								sa.f5TableHeight(); // 刷新表格高度 

+ 6 - 6
sp-admin/sa-view/tb-item/tb-item-list.html

@@ -29,7 +29,7 @@
 				<!-- ------------- 数据列表 ------------- -->
 				<el-table class="data-table" ref="data-table" :data="dataList">
 					<sa-td name="项目名称" prop="name" width="300px"></sa-td>
-                    <sa-td name="业务类型" prop="businessType">
+                   <!-- <sa-td name="业务类型" prop="businessType">
 						<template slot-scope="s">
 							<el-select :disabled="!sa.isAuth('tb-item-list-edit-type')" multiple v-model="s.row.type" placeholder="收费项" @change="businessChange(s.row)">
 								<el-option v-for="item in businessTypeList" :key="item.value" :value="item.value"
@@ -37,7 +37,7 @@
 								</el-option>
 							</el-select>
 						</template>
-					</sa-td>
+					</sa-td> -->
                     <sa-td name="税率" prop="taxRate"></sa-td>
 					<!-- <sa-td name="项目编号" prop="code"></sa-td> -->
 					<sa-td name="收费项" prop="code">
@@ -106,10 +106,10 @@
 					f5: function() {
 						sa.ajax('/TbItemType/getList', sa.removeNull(this.p), function(res) {
 							let list=res.data;
-							for(let i in list){
-								let obj=list[i];
-								obj.type=obj.businessType.split(',')
-							}
+							// for(let i in list){
+							// 	let obj=list[i];
+							// 	obj.type=obj.businessType.split(',')
+							// }
 							this.dataList = list; // 数据
 							this.dataCount = res.dataCount; // 数据总数 
 							sa.f5TableHeight(); // 刷新表格高度 

+ 1 - 1
sp-admin/static/sa.js

@@ -22,7 +22,7 @@ var sa = {
 		api_url: 'https://dxkaa1.bgigc.com/pro',
 		web_url: 'http://www.baidu.com'
 	}
-	sa.cfg = cfg_test; // 最终环境 , 上线前请选择正确的环境
+	sa.cfg = cfg_dev; // 最终环境 , 上线前请选择正确的环境
 })();
 
 

+ 1 - 1
sp-server/app.pid

@@ -1 +1 @@
-27420
+7416

+ 7 - 3
sp-server/src/main/java/com/pj/api/service/ApiService.java

@@ -16,6 +16,8 @@ import com.pj.current.config.MyConfig;
 import com.pj.current.config.PartConfig;
 import com.pj.current.config.WxConfig;
 import com.pj.current.satoken.StpUserUtil;
+import com.pj.project.relation_type_item.RelationTypeItem;
+import com.pj.project.relation_type_item.RelationTypeItemService;
 import com.pj.project.tb_account.TbAccount;
 import com.pj.project.tb_account.TbAccountService;
 import com.pj.project.tb_business.CarDisincle;
@@ -99,6 +101,8 @@ public class ApiService {
     private MyConfig myConfig;
     @Resource
     private TbCarService tbCarService;
+    @Resource
+    private RelationTypeItemService relationTypeItemService;
 
     private final List<String> CAR_LIST = StrUtil.splitTrim("浙,粤,京,津,冀,晋,蒙,辽,黑,沪,吉,苏,皖,赣,鲁,豫,鄂,湘,桂,琼,渝,川,贵,云,藏, 陕, 甘, 青, 宁", ",");
 
@@ -296,13 +300,13 @@ public class ApiService {
         for (TbItem tbItem : tbItems) {
             TbBusinessItem item = new TbBusinessItem();
             int num = tbItem.getNum();
+          RelationTypeItem relationTypeItem= relationTypeItemService.findByTypeIdAndItemId(otherBusinessBO.getItemTypeId(),tbItem.getId());
             BigDecimal itemTotalPrice = tbItem.getPrice().multiply(new BigDecimal(num));
             item.setNo(no + "0" + index).setPayTypeName(tbItem.getPayTypeName()).setPayType(tbItem.getPayType())
-                    .setBusinessType(tbItem.getBusinessType()).setTaxRate(NumberUtil.div(tbItem.getTaxRate().doubleValue(),100D,2))
-                    .setBusinessType(TbCostomer.CustomerEnum.DISINFECT_TYPE.getType());
+                    .setBusinessType(tbItem.getBusinessType()).setTaxRate(NumberUtil.div(tbItem.getTaxRate().doubleValue(),100D,2));
             item.setItemCode(tbItem.getItemCode()).setNum("1").setNum(num + "").setItemId(tbItem.getId()).setItemCode(tbItem.getItemCode())
                     .setItemName(tbItem.getItemName()).setItemPrice(tbItem.getPrice()).setRemark(tbItem.getRemark())
-                    .setItemTypeId(tbItem.getTypeId()).setItemTypeName(tbItem.getTypeName())
+                    .setItemTypeId(otherBusinessBO.getItemTypeId()).setItemTypeName(relationTypeItem.getTypeName())
                     .setUnit(tbItem.getUnit()).setTotal(itemTotalPrice).setCreateTime(new Date());
             price = price.add(itemTotalPrice);
             itemList.add(item);

+ 1 - 0
sp-server/src/main/java/com/pj/project/relation_type_item/RelationTypeItem.java

@@ -43,6 +43,7 @@ public class RelationTypeItem extends Model<RelationTypeItem> implements Seriali
 	 * 类型ID 
 	 */
 	private String typeId;
+	private String typeName;
 
 	/**
 	 * 是否必须 

+ 2 - 2
sp-server/src/main/java/com/pj/project/relation_type_item/RelationTypeItemController.java

@@ -41,8 +41,8 @@ public class RelationTypeItemController {
     }
 
     @RequestMapping("delete")
-    public AjaxJson delete(String id) {
-        relationTypeItemService.removeById(id);
+    public AjaxJson delete(String id,String typeId) {
+        relationTypeItemService.removeRelation(id,typeId);
         return AjaxJson.getSuccess();
     }
 

+ 25 - 10
sp-server/src/main/java/com/pj/project/relation_type_item/RelationTypeItemService.java

@@ -9,6 +9,8 @@ import com.baomidou.mybatisplus.extension.service.IService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.pj.project.tb_item.TbItem;
 import com.pj.project.tb_item.TbItemMapper;
+import com.pj.project.tb_item_type.TbItemType;
+import com.pj.project.tb_item_type.TbItemTypeService;
 import com.pj.utils.so.SoMap;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -16,6 +18,8 @@ import org.springframework.stereotype.Service;
 import com.pj.utils.sg.*;
 import org.springframework.transaction.annotation.Transactional;
 
+import javax.annotation.Resource;
+
 /**
  * Service: relation_type_item --
  *
@@ -30,6 +34,8 @@ public class RelationTypeItemService extends ServiceImpl<RelationTypeItemMapper,
      */
     @Autowired
     RelationTypeItemMapper relationTypeItemMapper;
+    @Resource
+    private TbItemTypeService tbItemTypeService;
 
 
     /**
@@ -49,13 +55,14 @@ public class RelationTypeItemService extends ServiceImpl<RelationTypeItemMapper,
     public void setBatch(String typeId, String itemIds) {
         List<String> itemIdList = StrUtil.splitTrim(itemIds, ",");
         List<RelationTypeItem> list = findByTypeId(typeId);
+        TbItemType tbItemType = tbItemTypeService.getById(typeId);
         List<String> removeIds = list.stream().filter(relationTypeItem -> !itemIdList.contains(relationTypeItem.getItemId())).map(RelationTypeItem::getId).collect(Collectors.toList());
         this.removeByIds(removeIds);
         List<String> dbItemIdList = list.stream().map(RelationTypeItem::getItemId).collect(Collectors.toList());
         itemIdList.stream().filter(id -> !dbItemIdList.contains(id)).
                 forEach(id -> {
                     RelationTypeItem relationTypeItem = new RelationTypeItem();
-                    relationTypeItem.setItemId(id).setTypeId(typeId).setNeed(1);
+                    relationTypeItem.setItemId(id).setTypeId(typeId).setNeed(1).setTypeName(tbItemType.getName());
                     this.save(relationTypeItem);
                 });
 
@@ -69,38 +76,46 @@ public class RelationTypeItemService extends ServiceImpl<RelationTypeItemMapper,
 
     public void setSingle(String typeId, String itemId) {
         RelationTypeItem relationTypeItem = new RelationTypeItem();
-        relationTypeItem.setNeed(1).setItemId(itemId).setTypeId(typeId);
+        TbItemType tbItemType = tbItemTypeService.getById(typeId);
+        relationTypeItem.setNeed(1).setItemId(itemId).setTypeId(typeId).setTypeName(tbItemType.getName());
         this.save(relationTypeItem);
     }
 
-    public RelationTypeItem findByTypeIdAndItemId(String typeId, String itemId){
-        QueryWrapper<RelationTypeItem>ew=new QueryWrapper<>();
-        ew.eq("type_id",typeId);
-        ew.eq("item_id",itemId);
+    public RelationTypeItem findByTypeIdAndItemId(String typeId, String itemId) {
+        QueryWrapper<RelationTypeItem> ew = new QueryWrapper<>();
+        ew.eq("type_id", typeId);
+        ew.eq("item_id", itemId);
         return getOne(ew);
     }
 
     public void updateStatus(String typeId, String itemId, int need) {
-        RelationTypeItem relationTypeItem= this.findByTypeIdAndItemId(typeId,itemId);
+        RelationTypeItem relationTypeItem = this.findByTypeIdAndItemId(typeId, itemId);
         relationTypeItem.setNeed(need);
         this.updateById(relationTypeItem);
     }
 
     public void updateRemarkMust(String typeId, String itemId, int mustRemark) {
-        RelationTypeItem relationTypeItem= this.findByTypeIdAndItemId(typeId,itemId);
+        RelationTypeItem relationTypeItem = this.findByTypeIdAndItemId(typeId, itemId);
         relationTypeItem.setMustRemark(mustRemark);
         this.updateById(relationTypeItem);
     }
 
     public void updateRemarkNeed(String typeId, String itemId, int needRemark) {
-        RelationTypeItem relationTypeItem= this.findByTypeIdAndItemId(typeId,itemId);
+        RelationTypeItem relationTypeItem = this.findByTypeIdAndItemId(typeId, itemId);
         relationTypeItem.setNeedRemark(needRemark);
         this.updateById(relationTypeItem);
     }
 
     public void updateNum(String typeId, String itemId, int inc) {
-        RelationTypeItem relationTypeItem= this.findByTypeIdAndItemId(typeId,itemId);
+        RelationTypeItem relationTypeItem = this.findByTypeIdAndItemId(typeId, itemId);
         relationTypeItem.setInc(inc);
         this.updateById(relationTypeItem);
     }
+
+    public void removeRelation(String id, String typeId) {
+        QueryWrapper<RelationTypeItem>ew=new QueryWrapper<>();
+        ew.eq("type_id",typeId);
+        ew.eq("item_id",id);
+        this.remove(ew);
+    }
 }

+ 11 - 3
sp-server/src/main/java/com/pj/project/tb_business/TbBusinessService.java

@@ -348,9 +348,17 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
             items.forEach(item -> {
                 String businessType = item.getBusinessType();
                 if (!StrUtil.equals(businessType, TbCostomer.CustomerEnum.BUSINESS_TYPE.getType())) {
-                    String remark = "车牌:" + business.getCardNo();
-                    if (StrUtil.isNotEmpty(business.getChinaCarNo())) {
-                        remark += "、" + business.getChinaCarNo();
+                    String remark = "车牌:";
+                   String carNo=business.getCardNo();
+                   String chinaCarNo=business.getChinaCarNo();
+                   if (StrUtil.isNotEmpty(carNo)&&StrUtil.isNotEmpty(chinaCarNo)){
+                       remark +=carNo+ "、" + chinaCarNo;
+                   }
+                    if (StrUtil.isEmpty(carNo)&&StrUtil.isNotEmpty(chinaCarNo)){
+                        remark +=chinaCarNo;
+                    }
+                    if (StrUtil.isNotEmpty(carNo)&&StrUtil.isEmpty(chinaCarNo)){
+                        remark +=carNo;
                     }
                     MsgDataBO msgDataBO = new MsgDataBO("订单号:" + item.getNo(), item.getItemTypeName(), item.getItemName(), business.getGoodsName(), DateUtil.now(), remark);
                     StrUtil.splitTrim(businessType, ",").forEach(type -> {

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

@@ -6,9 +6,9 @@ spring:
     # 数据源配置
     datasource:
         type: com.alibaba.druid.pool.DruidDataSource
-        url: jdbc:mysql://127.0.0.1:3306/pco_system?useUnicode=true&characterEncoding=utf-8&useSSL=true&serverTimezone=GMT%2B8
+        url: jdbc:mysql://47.101.143.145:3306/pco?useUnicode=true&characterEncoding=utf-8&useSSL=true&serverTimezone=GMT%2B8
         username: root
-        password: 123456
+        password: 1qaz@WSX
         # 是否打开sql监控台  (生产环境请务必关闭此选项)
         druid:
             stat-view-servlet: