diff --git a/fuintAdmin_zt/src/views/Site/index.vue b/fuintAdmin_zt/src/views/Site/index.vue
index 0882cb4ab..dc66d57c1 100644
--- a/fuintAdmin_zt/src/views/Site/index.vue
+++ b/fuintAdmin_zt/src/views/Site/index.vue
@@ -165,11 +165,11 @@
-
-
+
+
-
-
+
+
@@ -180,6 +180,34 @@
>{{dict.label}}
+
+
+
+
+
+
+ 金额上限
+ 时间上限
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -349,10 +377,15 @@
parentId:'',
deptType:'1',
status:'qy',
- leader_name:'',
- leader_phone:'',
+ leaderName:'',
+ leaderPhone:'',
// parentName:'请先选择父级节点',
deptName: '',
+ turnoverLimit: '',
+ turnoverType: "1",
+ turnoverTime: '',
+
+
},
filterText:'',
xtitle:'',
@@ -445,11 +478,11 @@
rolelist:'',
// 表单校验
rules: {
- leader_name: [
- { required: true, message: '不能为空', trigger: 'blur' },
+ leaderName: [
+ { required: true, message: '姓名不能为空', trigger: 'blur' },
],
- leader_phone: [
- { required: true, message: '不能为空', trigger: 'blur' },
+ leaderPhone: [
+ { required: true, message: '电话不能为空', trigger: 'blur' },
],
deptName: [
@@ -538,23 +571,31 @@
activecilck(data){
console.log('点树',data)
+ this.cleanUp()
// 点击树之后
this.queryParams.deptId = data.id
this.deptType = data.deptType
// 新增节点
- if(this.activeName == 'info'){
+ // if(this.activeName == 'info'){
this.appedit(data.id,data.label)
- }
+ // }
// 用户请求
- if(this.activeName == 'list'){
+ // if(this.activeName == 'list'){
this.getList();
- }
+ // }
},
cleanUp(){
this.ruleForm = {
parentId:'',
- depId:'',
+ deptType:'1',
+ status:'qy',
+ leaderName:'',
+ leaderPhone:'',
+ // parentName:'请先选择父级节点',
deptName: '',
+ turnoverLimit: '',
+ turnoverType: "1",
+ turnoverTime: '',
}
},
handleChange(value) {
@@ -588,8 +629,8 @@
},
//修改
- submitFormseide(){
- this.$refs[formName].validate((valid) => {
+ submitFormseide(ruleForm){
+ this.$refs[ruleForm].validate((valid) => {
if (valid) {
deptedit(this.ruleForm).then(res=>{
@@ -663,8 +704,14 @@
let ancestors = res.data.ancestors.slice(2).toString();
console.log('Userlist:',res)
this.parentName = res.data.parentName
- this.ruleForm.parentId = res.data.parentId
- this.ruleForm.status = res.data.status
+ this.ruleForm = res.data
+ // this.ruleForm.parentId = res.data.parentId
+ // this.ruleForm.status = res.data.status
+ // this.ruleForm.leaderName = res.data.leaderName
+ // this.ruleForm.leaderPhone = res.data.leaderPhone
+ // this.ruleForm.turnoverType = res.data.turnoverType
+ // this.ruleForm.turnoverTime = res.data.turnoverTime
+ // this.ruleForm.turnoverType = res.data.turnoverType
if(res.data.status == 'qy'){
this.value10 = true
}else {
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/integral/service/impl/IntegralSettingsServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/integral/service/impl/IntegralSettingsServiceImpl.java
index b66e32d5c..0045b81c9 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/integral/service/impl/IntegralSettingsServiceImpl.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/integral/service/impl/IntegralSettingsServiceImpl.java
@@ -19,8 +19,10 @@ import com.fuint.business.petrolStationManagement.entity.OilNumber;
import com.fuint.business.petrolStationManagement.mapper.OilNumberMapper;
import com.fuint.business.storeInformation.entity.LJStore;
import com.fuint.business.storeInformation.service.ILJStoreService;
+import com.fuint.business.userManager.entity.LJUserGrade;
import com.fuint.business.userManager.entity.UserBalance;
import com.fuint.business.userManager.mapper.LJUserMapper;
+import com.fuint.business.userManager.service.LJUserGradeService;
import com.fuint.business.userManager.service.UserBalanceService;
import com.fuint.business.userManager.vo.LJUserVo;
import org.springframework.stereotype.Service;
@@ -215,7 +217,8 @@ public class IntegralSettingsServiceImpl implements IntegralSettingsService {
}
}
-
+ @Resource
+ LJUserGradeService ljUserGradeService;
/**
* 签到功能
@@ -230,11 +233,27 @@ public class IntegralSettingsServiceImpl implements IntegralSettingsService {
Integer integer = todayIsSignIn(integralSettings.getStoreId());
if (integer == 0) {
-
- // 根据店铺id 查找连锁店id
-// LJStore ljStore = iljStoreService.selectStoreByIdUni(integralSettings.getStoreId());
// 查询当前用户
LJUserVo ljUserVos = ljUserMapper.selectAllInfoById4Chain(nowAccountInfo.getId(),integralSettings.getChainStoreId());
+
+ if (ObjectUtil.isEmpty(ljUserVos)) {
+ // 新增余额信息
+ UserBalance userBalanceAdd = new UserBalance();
+ userBalanceAdd.setMtUserId(nowAccountInfo.getId());
+ userBalanceAdd.setChainStoreId(integralSettings.getChainStoreId());
+ userBalanceAdd.setStoreId(integralSettings.getStoreId());
+ userBalanceAdd.setCardBalance(0.0);
+ userBalanceAdd.setPoints(0);
+ userBalanceAdd.setGrowthValue(0);
+ userBalanceAdd.setConsumeNum(0);
+ LJUserGrade ljUserGrade = ljUserGradeService.selectUserGradeByStoreId(integralSettings.getStoreId());
+ if (ObjectUtil.isNotEmpty(ljUserGrade) && ObjectUtil.isNotEmpty(ljUserGrade.getId())) {
+ userBalanceAdd.setGradeId(ljUserGrade.getId());
+ }
+ // 新增会员余额信息
+ userBalanceService.insertUserBalance(userBalanceAdd);
+ ljUserVos = ljUserMapper.selectAllInfoById4Chain(nowAccountInfo.getId(),integralSettings.getChainStoreId());
+ }
ljUserVos.setChainStoreId(integralSettings.getChainStoreId());
ljUserVos.setStoreId(integralSettings.getStoreId());
// 查询积分配置
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/controller/HandoverRecordController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/controller/HandoverRecordController.java
index 1c7d74d57..0c433f604 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/controller/HandoverRecordController.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/controller/HandoverRecordController.java
@@ -11,6 +11,7 @@ import io.lettuce.core.dynamic.annotation.Param;
import javax.annotation.Resource;
+import java.util.Map;
/**
* 交班记录表(HandoverRecord)表控制层
@@ -102,5 +103,15 @@ public class HandoverRecordController extends BaseController {
return getSuccessResult(handoverRecordService.handover());
}
+ /**
+ * 本地打印
+ * @return
+ */
+ @PostMapping("printLocally")
+ public ResponseObject printLocally(@RequestBody Map aa) {
+ handoverRecordService.printLocally(aa);
+ return getSuccessResult(true);
+ }
+
}
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/HandoverRecordService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/HandoverRecordService.java
index 0b2720237..8f9b0d315 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/HandoverRecordService.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/HandoverRecordService.java
@@ -61,5 +61,7 @@ public interface HandoverRecordService {
public Map handover();
+ public void printLocally(Map aa);
+
}
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/impl/HandoverRecordServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/impl/HandoverRecordServiceImpl.java
index bc284c803..e30d2b962 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/impl/HandoverRecordServiceImpl.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/impl/HandoverRecordServiceImpl.java
@@ -13,11 +13,13 @@ import com.fuint.business.store.mapper.MtStoreMapper;
import com.fuint.business.store.service.StoreService;
import com.fuint.business.userManager.mapper.LJUserMapper;
import com.fuint.business.userManager.vo.LJUserVo;
+import com.fuint.common.util.TscLibDll;
import com.fuint.framework.exception.BusinessCheckException;
import com.fuint.system.dict.entity.SysDictData;
import com.fuint.system.dict.entity.SysDictType;
import com.fuint.system.dict.service.ISysDictDataService;
import com.fuint.system.dict.service.ISysDictTypeService;
+import javafx.print.Printer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.fuint.common.util.TokenUtil;
@@ -33,10 +35,7 @@ import java.text.SimpleDateFormat;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
/**
* 交班记录表(HandoverRecord)表服务实现类
@@ -197,6 +196,7 @@ public class HandoverRecordServiceImpl implements HandoverRecordService {
return handoverMap;
}
+
public Map orderSummary(String startTime, String endTime) {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
// 油品订单(订单) 油品订单(退款) 油品订单(实收) 油品优惠(实收) 油品交易(实收)
@@ -249,6 +249,13 @@ public class HandoverRecordServiceImpl implements HandoverRecordService {
boolean flag = true;
for (Map stringObjectMap : mapList) {
+ if (ObjectUtil.isEmpty(map.get("payType"))) {
+ map.put("payType","other");
+ }
+ if (ObjectUtil.isEmpty(stringObjectMap.get("payType"))) {
+ map.put("payType","other");
+
+ }
if (map.get("payType").equals(stringObjectMap.get("payType"))) {
BigDecimal paidAmount = new BigDecimal(stringObjectMap.get("paidAmount").toString()).add(new BigDecimal(map.get("paidAmount").toString()));
BigDecimal refundAmount = new BigDecimal(stringObjectMap.get("refundAmount").toString()).add(new BigDecimal(map.get("refundAmount").toString()));
@@ -381,4 +388,500 @@ public class HandoverRecordServiceImpl implements HandoverRecordService {
return map;
}
+ private static final String LOAD_LIBRARY = "TSCLIB";
+
+ //打印机
+// private static final String print_model = "58130IVC";
+ @Override
+ public void printLocally(Map handover) {
+
+ Map baseInfo = (Map)handover.get("baseInfo");
+ Map orderSummary = (Map)handover.get("orderSummary");
+
+ // 支付方式汇总
+ List