Commit 517b2881 by 彭祥礼

新增下单页面部分功能和地址管理页面功能

parent 9057d294
package com.winsun.controller;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.winsun.auth.core.base.controller.BaseController;
import com.winsun.auth.core.common.model.ResponseData;
import com.winsun.bean.YxtAddress;
import com.winsun.bean.YxtCoupon;
import com.winsun.mapper.YxtAddressMapper;
import com.winsun.mapper.YxtCouponMapper;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.text.SimpleDateFormat;
import java.util.*;
/**
* 兑换券校检
*
* @Author: xiangli
* @Date:
*/
@Slf4j
@RestController
@RequestMapping("/yxtCard")
public class YxtCardController extends BaseController {
private static SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
@Autowired
private YxtCouponMapper yxtCouponMapper;
@Autowired
private YxtAddressMapper yxtAddressMapper;
/**
* 进入院线通兑换券销售界面
* @return
*/
@RequestMapping("/getCardCount")
public ResponseData<Map<String, Object>> getCardCount() {
Wrapper<YxtCoupon> yxtCouponWrapper = new EntityWrapper<>();
yxtCouponWrapper.eq("state",1);
yxtCouponWrapper.eq("shelf_state",1);
Integer cardNum = yxtCouponMapper.selectCount(yxtCouponWrapper);
Wrapper<YxtCoupon> yxtCouponWrapper1 = new EntityWrapper<>();
yxtCouponWrapper1.eq("state",2);
Integer salesNum = yxtCouponMapper.selectCount(yxtCouponWrapper1);
Map<String, Object> map = new Hashtable<>();
map.put("cardNum",cardNum);
map.put("salesNum",salesNum);
map.put("nMoney",25.0);
return ResponseData.success(map);
}
/**
* 进入院线通实体票下单界面
* @return
*/
@RequestMapping("/enterPay")
public ResponseData<String> enterPay(){
/*String code = request.getParameter("code");
String result = WxInterfacesUtil.getAccess_tokenByCode(code);
if (StringUtils.isNotBlank(result)) {
JSONObject obj = JSONObject.fromObject(result);
String openId = String.valueOf(obj.get("openid"));
// code重复使用时,从session拿出第一次保存openId赋予openId
if("null".equals(openId) && !"null".equals(String.valueOf(request.getSession().getAttribute("openId")))){
openId = String.valueOf(request.getSession().getAttribute("openId"));
}
// code重复使用时,openId为"null",不更新session
if(!"null".equals(openId)){
request.getSession().setAttribute("openId", openId);
}
request.setAttribute("openId", openId);
System.out.println("openId:" +openId);
}*/
String openId = "isOk";
return ResponseData.success(openId);
}
/**
* 获取用户地址
* @return
*/
@RequestMapping("/getUserAddress")
public ResponseData<List<YxtAddress>> getUserAddress(@RequestParam("userId") String userId,@RequestParam("addressId") String addressId){
Wrapper<YxtAddress> wrapper = new EntityWrapper<>();
if(StringUtils.isNotBlank(addressId)){
wrapper.eq(StringUtils.isNotBlank(userId),"id",addressId);
}else{
wrapper.eq("user_id",userId);
}
List<YxtAddress> list = yxtAddressMapper.selectList(wrapper);
return ResponseData.success(list);
}
/**
* 获取用户地址
* @return
*/
@RequestMapping("/addAddress")
public ResponseData<List<YxtAddress>> addAddress(@RequestParam("address") String address){
HashMap hashMap = JSON.parseObject(address, HashMap.class);
YxtAddress yxtAddress = new YxtAddress();
String userId = hashMap.get("userId").toString();
yxtAddress.setUserId(userId);
String consignee = hashMap.get("consignee").toString();
if(StringUtils.isBlank(consignee)){
return ResponseData.error("收货人不能为空!!!");
}
yxtAddress.setConsignee(consignee);
String phone = hashMap.get("phone").toString();
if(StringUtils.isBlank(phone)){
return ResponseData.error("联系电话不能为空!!!");
}
yxtAddress.setPhone(phone);
String area = hashMap.get("area").toString();
if(StringUtils.isBlank(area)){
return ResponseData.error("地址不能为空!!!");
}
yxtAddress.setArea(area);
yxtAddress.setDetailAddress(hashMap.get("detailAddress").toString());
yxtAddress.setUpdateDate(new Date());
Integer num = yxtAddressMapper.insert(yxtAddress);
if(num==1){
return ResponseData.success();
}
return ResponseData.error("新增地址失败!!!");
}
}
...@@ -20,36 +20,36 @@ public class LzKpi implements Serializable { ...@@ -20,36 +20,36 @@ public class LzKpi implements Serializable {
* *
*/ */
@TableId(value = "id", type = IdType.AUTO) @TableId(value = "id", type = IdType.AUTO)
private int id; private Integer id;
/** /**
* *
*/ */
@TableId(value = "report_daily") @TableId(value = "report_daily")
private int reportDaily; private Integer reportDaily;
/** /**
* *
*/ */
@TableId(value = "collective_sales") @TableId(value = "collective_sales")
private int collectiveSales; private Integer collectiveSales;
/** /**
* *
*/ */
@TableId(value = "weekly_meeting") @TableId(value = "weekly_meeting")
private int weeklyMeeting; private Integer weeklyMeeting;
/** /**
* *
*/ */
@TableId(value = "organ_training") @TableId(value = "organ_training")
private int organTraining; private Integer organTraining;
/** /**
* *
*/ */
@TableId(value = "design_plan") @TableId(value = "design_plan")
private int designPlan; private Integer designPlan;
/** /**
* *
*/ */
private int kpi; private Integer kpi;
/** /**
* *
*/ */
......
...@@ -42,22 +42,22 @@ public class LzWage implements Serializable { ...@@ -42,22 +42,22 @@ public class LzWage implements Serializable {
* 放号薪酬 * 放号薪酬
*/ */
@TableField("recharge_wage") @TableField("recharge_wage")
private double rechargeWage; private Double rechargeWage;
/** /**
* kpi总值 * kpi总值
*/ */
@TableField("kpi") @TableField("kpi")
private double kpi; private Double kpi;
/** /**
* kpi薪酬 * kpi薪酬
*/ */
@TableField("kpi_wage") @TableField("kpi_wage")
private double kpiWage; private Double kpiWage;
/** /**
* 总薪酬 * 总薪酬
*/ */
@TableField("wage") @TableField("wage")
private double wage; private Double wage;
} }
...@@ -44,7 +44,7 @@ public class ManagerKpi implements Serializable { ...@@ -44,7 +44,7 @@ public class ManagerKpi implements Serializable {
*应发绩效 *应发绩效
*/ */
@TableField("yf_performance") @TableField("yf_performance")
private double yfPerformance; private Double yfPerformance;
/** /**
*kpi总分 *kpi总分
*/ */
...@@ -74,21 +74,21 @@ public class ManagerKpi implements Serializable { ...@@ -74,21 +74,21 @@ public class ManagerKpi implements Serializable {
* 2018年5月至今累计佣金 * 2018年5月至今累计佣金
*/ */
@TableField("total_bonus") @TableField("total_bonus")
private double totalBonus; private Double totalBonus;
/** /**
* 2018年5月至今累计分成 * 2018年5月至今累计分成
*/ */
@TableField("total_fund") @TableField("total_fund")
private double totalFund; private Double totalFund;
/** /**
*秋营达标奖 *秋营达标奖
*/ */
@TableField("autumn_bonus") @TableField("autumn_bonus")
private double autumnBonus; private Double autumnBonus;
/** /**
*应发提成 *应发提成
*/ */
@TableField("yf_bonus") @TableField("yf_bonus")
private double yfBonus; private Double yfBonus;
} }
package com.winsun.bean; package com.winsun.bean;
import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableName; import com.baomidou.mybatisplus.annotations.TableName;
import lombok.Data; import lombok.Data;
import java.util.Date;
@Data @Data
@TableName("hhr_sales_order") @TableName("hhr_sales_order")
public class SalesOrder { public class SalesOrder {
...@@ -114,41 +113,41 @@ public class SalesOrder { ...@@ -114,41 +113,41 @@ public class SalesOrder {
/** /**
* 总激励 * 总激励
*/ */
private double allBonus; private Double allBonus;
/** /**
* 未发放激励 * 未发放激励
*/ */
private double nonSendBonus; private Double nonSendBonus;
/** /**
* 已发放激励 * 已发放激励
*/ */
private double sendBonus; private Double sendBonus;
/** /**
* 最近充值金额 * 最近充值金额
*/ */
private double recentlyAmount; private Double recentlyAmount;
/** /**
* 最近充值激励 * 最近充值激励
*/ */
private double recentlyBonus; private Double recentlyBonus;
/** /**
* 累计充值金额 * 累计充值金额
*/ */
private double monthAmount; private Double monthAmount;
/** /**
* 累计充值激励 * 累计充值激励
*/ */
private double monthBonus; private Double monthBonus;
/** /**
* 本金激励 * 本金激励
*/ */
private double capitalBonus; private Double capitalBonus;
} }
...@@ -43,7 +43,7 @@ public class YxtOrder implements Serializable { ...@@ -43,7 +43,7 @@ public class YxtOrder implements Serializable {
*金额 *金额
*/ */
@TableField("total_price") @TableField("total_price")
private double totalPrice; private Double totalPrice;
/** /**
*订单状态 (1:未付款 2:付款成功 3:付款失败 4:已取消订单) *订单状态 (1:未付款 2:付款成功 3:付款失败 4:已取消订单)
*/ */
...@@ -68,7 +68,7 @@ public class YxtOrder implements Serializable { ...@@ -68,7 +68,7 @@ public class YxtOrder implements Serializable {
*兑换券单价 *兑换券单价
*/ */
@TableField("unit_price") @TableField("unit_price")
private double unitPrice; private Double unitPrice;
/** /**
*订单类型 *订单类型
*/ */
......
...@@ -57,182 +57,182 @@ public class ZjlWage implements Serializable { ...@@ -57,182 +57,182 @@ public class ZjlWage implements Serializable {
*岗位工资 *岗位工资
*/ */
@TableField("position_wage") @TableField("position_wage")
private double positionWage; private Double positionWage;
/** /**
*绩效奖金(绩效工资+提成) *绩效奖金(绩效工资+提成)
*/ */
@TableField("performance_bonus") @TableField("performance_bonus")
private double performanceBonus; private Double performanceBonus;
/** /**
*专项奖 *专项奖
*/ */
@TableField("special_bonus") @TableField("special_bonus")
private double specialBonus; private Double specialBonus;
/** /**
*年终奖 *年终奖
*/ */
@TableField("year_end_bonus") @TableField("year_end_bonus")
private double yearEndBonus; private Double yearEndBonus;
/** /**
*节日费(元旦,春节,五一,十一) *节日费(元旦,春节,五一,十一)
*/ */
@TableField("festival_fee") @TableField("festival_fee")
private double festivalFee; private Double festivalFee;
/** /**
*高温补贴(6-10月) *高温补贴(6-10月)
*/ */
@TableField("high_subsidy") @TableField("high_subsidy")
private double highSubsidy; private Double highSubsidy;
/** /**
*通讯补贴 *通讯补贴
*/ */
@TableField("correspondence_subsidy") @TableField("correspondence_subsidy")
private double correspondenceSubsidy; private Double correspondenceSubsidy;
/** /**
*餐费补贴 *餐费补贴
*/ */
@TableField("table_money_subsidy") @TableField("table_money_subsidy")
private double tableMoneySubsidy; private Double tableMoneySubsidy;
/** /**
*交通补贴 *交通补贴
*/ */
@TableField("traffic_subsidy") @TableField("traffic_subsidy")
private double trafficSubsidy; private Double trafficSubsidy;
/** /**
*专项奖(秋营奖励) *专项奖(秋营奖励)
*/ */
@TableField("special_bonus_autumn") @TableField("special_bonus_autumn")
private double specialBonusAutumn; private Double specialBonusAutumn;
/** /**
*其他补扣补退 *其他补扣补退
*/ */
@TableField("other_subsidy") @TableField("other_subsidy")
private double otherSubsidy; private Double otherSubsidy;
/** /**
*应发合计 *应发合计
*/ */
@TableField("total_yf") @TableField("total_yf")
private double totalYf; private Double totalYf;
/** /**
*个人养老保险 *个人养老保险
*/ */
@TableField("endowment_insurance_personal") @TableField("endowment_insurance_personal")
private double endowmentInsurancePersonal; private Double endowmentInsurancePersonal;
/** /**
*个人缴纳失业保险 *个人缴纳失业保险
*/ */
@TableField("unenployment_insurance_personal") @TableField("unenployment_insurance_personal")
private double unenploymentInsurancePersonal; private Double unenploymentInsurancePersonal;
/** /**
*个人缴纳医疗保险 *个人缴纳医疗保险
*/ */
@TableField("medicare_personal") @TableField("medicare_personal")
private double medicarePersonal; private Double medicarePersonal;
/** /**
*个人保险小计 *个人保险小计
*/ */
@TableField("total_insurance") @TableField("total_insurance")
private double totalInsurance; private Double totalInsurance;
/** /**
*个人缴纳住房公积金 *个人缴纳住房公积金
*/ */
@TableField("reserved_fund") @TableField("reserved_fund")
private double reservedFund; private Double reservedFund;
/** /**
*个税 *个税
*/ */
@TableField("reserved_fund_tax") @TableField("reserved_fund_tax")
private double reservedFundTax; private Double reservedFundTax;
/** /**
*年终奖个税 *年终奖个税
*/ */
@TableField("year_end_bonus_tax") @TableField("year_end_bonus_tax")
private double yearEndBonusTax; private Double yearEndBonusTax;
/** /**
*个人其他补交补退 *个人其他补交补退
*/ */
@TableField("other_fee_personal") @TableField("other_fee_personal")
private double otherFeePersonal; private Double otherFeePersonal;
/** /**
*个人工会费 *个人工会费
*/ */
@TableField("dues_personal") @TableField("dues_personal")
private double duesPersonal; private Double duesPersonal;
/** /**
*个人缴交小计 *个人缴交小计
*/ */
@TableField("total_fee_personal") @TableField("total_fee_personal")
private double totalFeePersonal; private Double totalFeePersonal;
/** /**
*实发合计 *实发合计
*/ */
@TableField("total_sf") @TableField("total_sf")
private double totalSf; private Double totalSf;
/** /**
*单位养老保险 *单位养老保险
*/ */
@TableField("endowment_insurance_unit") @TableField("endowment_insurance_unit")
private double endowmentInsuranceUnit; private Double endowmentInsuranceUnit;
/** /**
*单位失业保险 *单位失业保险
*/ */
@TableField("unenployment_insurance_unit") @TableField("unenployment_insurance_unit")
private double unenploymentInsuranceUnit; private Double unenploymentInsuranceUnit;
/** /**
*单位医疗保险 *单位医疗保险
*/ */
@TableField("medicare_unit") @TableField("medicare_unit")
private double medicareUnit; private Double medicareUnit;
/** /**
*单位工伤保险 *单位工伤保险
*/ */
@TableField("employment_injury_insurance_unit") @TableField("employment_injury_insurance_unit")
private double employmentInjuryInsuranceUnit; private Double employmentInjuryInsuranceUnit;
/** /**
*单位生育保险 *单位生育保险
*/ */
@TableField("birth_insurance_unit") @TableField("birth_insurance_unit")
private double birthInsuranceUnit; private Double birthInsuranceUnit;
/** /**
*重大疾病保险 *重大疾病保险
*/ */
@TableField("illness_insurance_unit") @TableField("illness_insurance_unit")
private double illnessInsuranceUnit; private Double illnessInsuranceUnit;
/** /**
*单位公积金 *单位公积金
*/ */
@TableField("reserved_fund_unit") @TableField("reserved_fund_unit")
private double reservedFundUnit; private Double reservedFundUnit;
/** /**
*工会计提 *工会计提
*/ */
@TableField("labor_union_fee_unit") @TableField("labor_union_fee_unit")
private double laborUnionFeeUnit; private Double laborUnionFeeUnit;
/** /**
*商业意外险 *商业意外险
*/ */
@TableField("accident_insurance_unit") @TableField("accident_insurance_unit")
private double accidentInsuranceUnit; private Double accidentInsuranceUnit;
/** /**
*残保金 *残保金
*/ */
@TableField("disability_insurance_unit") @TableField("disability_insurance_unit")
private double disabilityInsuranceUnit; private Double disabilityInsuranceUnit;
/** /**
*单位其他补交补退 *单位其他补交补退
*/ */
@TableField("other_fee_unit") @TableField("other_fee_unit")
private double otherFeeUnit; private Double otherFeeUnit;
/** /**
*单位缴交小计 *单位缴交小计
*/ */
@TableField("total_fee_unit") @TableField("total_fee_unit")
private double totalFeeUnit; private Double totalFeeUnit;
/** /**
*总个人人工成本合计 *总个人人工成本合计
*/ */
@TableField("total_cast_personal") @TableField("total_cast_personal")
private double totalCastPersonal; private Double totalCastPersonal;
/** /**
*附加信息 *附加信息
*/ */
...@@ -242,97 +242,97 @@ public class ZjlWage implements Serializable { ...@@ -242,97 +242,97 @@ public class ZjlWage implements Serializable {
*邮电人才服务管理费(200/人) *邮电人才服务管理费(200/人)
*/ */
@TableField("manage_fee") @TableField("manage_fee")
private double manageFee; private Double manageFee;
/** /**
*单位总成本(含支出税点) *单位总成本(含支出税点)
*/ */
@TableField("total_cast_unit") @TableField("total_cast_unit")
private double totalCastUnit; private Double totalCastUnit;
/** /**
*个人缴纳养老保险2 *个人缴纳养老保险2
*/ */
@TableField("endowment_insurance_personal2") @TableField("endowment_insurance_personal2")
private double endowmentInsurancePersonal2; private Double endowmentInsurancePersonal2;
/** /**
*个人缴纳失业保险2 *个人缴纳失业保险2
*/ */
@TableField("unenployment_insurance_personal2") @TableField("unenployment_insurance_personal2")
private double unenploymentInsurancePersonal2; private Double unenploymentInsurancePersonal2;
/** /**
*个人缴纳医疗保险2 *个人缴纳医疗保险2
*/ */
@TableField("medicare_personal2") @TableField("medicare_personal2")
private double medicarePersonal2; private Double medicarePersonal2;
/** /**
*个人缴纳住房公积金2 *个人缴纳住房公积金2
*/ */
@TableField("resvered_fund_personal2") @TableField("resvered_fund_personal2")
private double resveredFundPersonal2; private Double resveredFundPersonal2;
/** /**
*单位养老保险2 *单位养老保险2
*/ */
@TableField("endowment_insurance_unit2") @TableField("endowment_insurance_unit2")
private double endowmentInsuranceUnit2; private Double endowmentInsuranceUnit2;
/** /**
*单位失业保险2 *单位失业保险2
*/ */
@TableField("unenployment_insurance_unit2") @TableField("unenployment_insurance_unit2")
private double unenploymentInsuranceUnit2; private Double unenploymentInsuranceUnit2;
/** /**
*单位医疗保险2 *单位医疗保险2
*/ */
@TableField("medicare_unit2") @TableField("medicare_unit2")
private double medicareUnit2; private Double medicareUnit2;
/** /**
*单位工伤保险2 *单位工伤保险2
*/ */
@TableField("employment_injury_insurance_unit2") @TableField("employment_injury_insurance_unit2")
private double employmentInjuryInsuranceUnit2; private Double employmentInjuryInsuranceUnit2;
/** /**
*单位生育保险2 *单位生育保险2
*/ */
@TableField("birth_insurance_unit2") @TableField("birth_insurance_unit2")
private double birthInsuranceUnit2; private Double birthInsuranceUnit2;
/** /**
*重大疾病保险企业缴纳2 *重大疾病保险企业缴纳2
*/ */
@TableField("illness_insurance_unit2") @TableField("illness_insurance_unit2")
private double illnessInsuranceUnit2; private Double illnessInsuranceUnit2;
/** /**
*单位住房公积金2 *单位住房公积金2
*/ */
@TableField("reserved_insurance_unit2") @TableField("reserved_insurance_unit2")
private double reservedInsuranceUnit2; private Double reservedInsuranceUnit2;
/** /**
*合并计税 *合并计税
*/ */
@TableField("total_insurance_unit2") @TableField("total_insurance_unit2")
private double totalInsuranceUnit2; private Double totalInsuranceUnit2;
/** /**
*本月计税工资 *本月计税工资
*/ */
@TableField("wage") @TableField("wage")
private double wage; private Double wage;
/** /**
*本月抵税扣除 *本月抵税扣除
*/ */
@TableField("wage_tax") @TableField("wage_tax")
private double wageTax; private Double wageTax;
/** /**
*本月工资抵税 *本月工资抵税
*/ */
@TableField("wage_tax_after") @TableField("wage_tax_after")
private double wageTaxAfter; private Double wageTaxAfter;
/** /**
*年终奖应税 *年终奖应税
*/ */
@TableField("last_year_end_bonus") @TableField("last_year_end_bonus")
private double lastYearEndBonus; private Double lastYearEndBonus;
/** /**
*年终奖个税计算 *年终奖个税计算
*/ */
@TableField("last_year_end_bonus_tax") @TableField("last_year_end_bonus_tax")
private double lastYearEndBonusTax; private Double lastYearEndBonusTax;
/** /**
*银行账号 *银行账号
*/ */
...@@ -342,11 +342,11 @@ public class ZjlWage implements Serializable { ...@@ -342,11 +342,11 @@ public class ZjlWage implements Serializable {
*督导成本 *督导成本
*/ */
@TableField("manager_cast") @TableField("manager_cast")
private double managerCast; private Double managerCast;
/** /**
*学子公司成本 *学子公司成本
*/ */
@TableField("xz_company_cast") @TableField("xz_company_cast")
private double xzCompanyCast; private Double xzCompanyCast;
} }
...@@ -102,10 +102,10 @@ public class LzSalaryController extends BaseController { ...@@ -102,10 +102,10 @@ public class LzSalaryController extends BaseController {
wage.setUserId(Integer.valueOf(sysUserList.get(0).getId())); wage.setUserId(Integer.valueOf(sysUserList.get(0).getId()));
wage.setMonth(hashMap.get("month").toString()); wage.setMonth(hashMap.get("month").toString());
wage.setRechargeNum(Integer.valueOf(hashMap.get("rechargeNum").toString())); wage.setRechargeNum(Integer.valueOf(hashMap.get("rechargeNum").toString()));
wage.setRechargeWage(Integer.valueOf(hashMap.get("rechargeWage").toString())); wage.setRechargeWage(Double.valueOf(hashMap.get("rechargeWage").toString()));
wage.setKpi(Integer.valueOf(hashMap.get("kpi").toString())); wage.setKpi(Double.valueOf(hashMap.get("kpi").toString()));
wage.setKpiWage(Integer.valueOf(hashMap.get("kpiWage").toString())); wage.setKpiWage(Double.valueOf(hashMap.get("kpiWage").toString()));
wage.setWage(Integer.valueOf(hashMap.get("wage").toString())); wage.setWage(Double.valueOf(hashMap.get("wage").toString()));
lzWageMpapper.insert(wage); lzWageMpapper.insert(wage);
return ResponseData.success("添加成功!"); return ResponseData.success("添加成功!");
} }
......
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