Merge branch 'score_shop' into api_score_meger
# Conflicts:
# zq-erp/src/main/resources/config/application.properties
| | |
| | | */ |
| | | public static final String SHOP_MANAGE_JJCPAS_CONSUME = "shopManageJjcpasConsume"; |
| | | |
| | | |
| | | /** |
| | | * 赠送金额购买产品算赠送购买 |
| | | */ |
| | | public static final String SHOP_MANAGE_GIFTISFREE = "shopManageGiftisfree"; |
| | | |
| | | /** |
| | | * 钉钉通知token |
| | |
| | | /** |
| | | * 收款 |
| | | */ |
| | | @RequestMapping(value = "sk") |
| | | @RequestMapping(value = "/sk") |
| | | public @ResponseBody |
| | | AjaxResult sk(SysOrder order) throws GlobleException { |
| | | orderService.updateReceiptMoney(order); |
| | |
| | | public @ResponseBody |
| | | AjaxResult showList(PaginationVO pageVo, SysVipInfo vipInfo) { |
| | | |
| | | // if (!getMe().getShopRole().equals(Dictionary.FLAG_YES_Y)) { |
| | | vipInfo.setShopId(getMe().getShopId()); |
| | | // } |
| | | |
| | | QueryUtil.setQueryLimit(vipInfo); |
| | | |
| | | return showList(vipInfoService, vipInfo, pageVo); |
| | | } |
| | | |
| | |
| | | import com.matrix.core.tools.LogUtil; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.common.constance.AppConstance; |
| | | |
| | | import java.lang.reflect.Method; |
| | | |
| | |
| | | |
| | | /** |
| | | * 为查询对象加上当前登录人的门店和公司查询限制 |
| | | * |
| | | * @param queryObj |
| | | */ |
| | | public static void setQueryLimit(Object queryObj) { |
| | | SysUsers sysUsers = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY); |
| | | |
| | | Class<Object> objClazz = (Class<Object>) queryObj.getClass(); |
| | | try { |
| | | if (!AppConstance.USER_TYPE_ADMIN.equals(sysUsers.getSuUserType())) { |
| | | Method setShopId = (Method) objClazz.getMethod("setShopId",Long.class); |
| | | setShopId.invoke(queryObj, sysUsers.getShopId()); |
| | | } |
| | | Method setCompanyId = (Method) objClazz.getMethod("setCompanyId",Long.class); |
| | | setCompanyId.invoke(queryObj, sysUsers.getCompanyId()); |
| | | } catch (Exception e) { |
| | | LogUtil.error(e.getMessage(), e); |
| | | throw new GlobleException("系统参数错误007"); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 限制数据公司id |
| | | * |
| | | * @param queryObj |
| | | */ |
| | | public static void setQueryLimitCom(Object queryObj) { |
| | |
| | | throw new GlobleException("系统参数错误008"); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.*; |
| | | |
| | | /** |
| | |
| | | calculationProjPercentage(AchieveRuleItem.ACHIEVE_TYPE_ZS,achieveNew.getFreeConsume(),beauticianState.getProjId())); |
| | | |
| | | } else { |
| | | achieveNew.setHisConsume(projUse.getPrice()*beauticianState.getCount()); |
| | | achieveNew.setHisConsume(new BigDecimal(projUse.getPrice()*beauticianState.getCount()).setScale(2, BigDecimal.ROUND_HALF_DOWN).doubleValue()); |
| | | //计算提成 |
| | | achieveNew.setProjPercentage( |
| | | calculationProjPercentage(AchieveRuleItem.ACHIEVE_TYPE_BJ,achieveNew.getHisConsume(),beauticianState.getProjId())); |
| | |
| | | taocanProjUse.setIsCourse(taocanShoppingGoods.getIsCourse()); |
| | | taocanProjUse.setIsInfinite(taocanShoppingGoods.getIsInfinite()); |
| | | // 赠送和打折后金额为0的都视为赠送项目 |
| | | if (sysOrderItem.getIsFree().equals(Dictionary.FLAG_NO) && sysOrderItem.getZkPrice() > 0) { |
| | | if (sysOrderItem.getIsFree().equals(Dictionary.FLAG_NO) && sysOrderItem.getZkPrice() > 0 && !isGiftMoneyPay(order)) { |
| | | taocanProjUse.setSource(Dictionary.TAOCAN_SOURCE_GM); |
| | | } else { |
| | | taocanProjUse.setSource(Dictionary.TAOCAN_SOURCE_ZS); |
| | |
| | | |
| | | |
| | | puse.setProjName(sysOrderItem.getShoppingGoods().getName()); |
| | | |
| | | |
| | | // 赠送和打折后金额为0的都视为赠送项目 |
| | | if (sysOrderItem.getIsFree().equals(Dictionary.FLAG_NO) && sysOrderItem.getZkPrice() > 0) { |
| | | if (sysOrderItem.getIsFree().equals(Dictionary.FLAG_NO) && sysOrderItem.getZkPrice() > 0 && !isGiftMoneyPay(order)) { |
| | | puse.setSource(Dictionary.TAOCAN_SOURCE_GM); |
| | | puse.setPrice(sysOrderItem.getZkPrice()); |
| | | } else { |
| | |
| | | sysProjUseDao.insert(puse); |
| | | } |
| | | |
| | | /** |
| | | * 全是赠送金额,且配置了赠送金额购买计算为赠送 |
| | | * @param order |
| | | * @return |
| | | */ |
| | | private boolean isGiftMoneyPay(SysOrder order) { |
| | | BusParameterSettings giftiIsfree = busParameterSettingsDao.selectCompanyParamByCode(AppConstance.SHOP_MANAGE_GIFTISFREE, order.getCompanyId()); |
| | | if(giftiIsfree.getParamValue().equals("是")){ |
| | | return order.getFlows().stream().allMatch(item -> SysOrderFlow.IS_GIFT_Y.equals(item.getIsGift())); |
| | | }else{ |
| | | return false; |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 会员卡充值 |
| | |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.math.BigDecimal; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | |
| | | } |
| | | // 设置项目总时长 |
| | | sysProjServices.setTotalTime(totalTime); |
| | | sysProjServices.setMoney(hkPrice); |
| | | sysProjServices.setMoney(new BigDecimal(hkPrice).setScale(2, BigDecimal.ROUND_HALF_DOWN).doubleValue()); |
| | | sysProjServicesDao.update(sysProjServices); |
| | | return sysProjServices; |
| | | } |
| | |
| | | <el-table-column |
| | | prop="projInfo.name" |
| | | label="商品名称" |
| | | width="280"> |
| | | width="400"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="projUse.source" |
| | | label="来源" |
| | | width="400"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | :formatter="hkPrice" |
| | | label="划扣金额" |
| | | width="100"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="count" |
| | | label="次数" |
| | | width="100"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="projInfo.timeLength" |
| | |
| | | width="200"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="address" |
| | | label="服务时间" :formatter="serviceTime"> |
| | | </el-table-column> |
| | | <el-table-column |
| | |
| | | </el-table-column> |
| | | <el-table-column label="操作"> |
| | | <template slot-scope="scope"> |
| | | <el-button matrix:btn="vipInfo-youxiao" v-if="scope.row.status!='有效'" type="text" size="small" @click="tabProjValid(scope.$index, scope.row)">有效</el-button> |
| | | <el-button matrix:btn="vipInfo-wuxiao" v-if="scope.row.status!='无效'" type="text" size="small" @click="tabProjInvalid(scope.$index, scope.row)">无效</el-button> |
| | | <el-button matrix:btn="vipInfo-dongjie" v-if="scope.row.status!='冻结'" type="text" size="small" @click="tabProjCold(scope.$index, scope.row)">冻结</el-button> |
| | | <el-button matrix:btn="vipInfo-cardEdit" type="text" size="small" @click="tabProjEdit(scope.$index, scope.row)">编辑</el-button> |
| | | <el-button matrix:btn="vipinfoClub-youxiao" v-if="scope.row.status!='有效'" type="text" size="small" @click="tabProjValid(scope.$index, scope.row)">有效</el-button> |
| | | <el-button matrix:btn="vipinfoClub-wuxiao" v-if="scope.row.status!='无效'" type="text" size="small" @click="tabProjInvalid(scope.$index, scope.row)">无效</el-button> |
| | | <el-button matrix:btn="vipinfoClub-dongjie" v-if="scope.row.status!='冻结'" type="text" size="small" @click="tabProjCold(scope.$index, scope.row)">冻结</el-button> |
| | | <el-button matrix:btn="vipinfoClub-cardEdit" type="text" size="small" @click="tabProjEdit(scope.$index, scope.row)">编辑</el-button> |
| | | <el-button type="text" @click="openOrder(scope.$index, scope.row)" size="small">订单</el-button> |
| | | <el-button type="text" size="small" @click="openProjUseFlow(scope.$index, scope.row)">操作记录</el-button> |
| | | </template> |
| | |
| | | <table class="table table-bordered"> |
| | | <tr> |
| | | <th>项目名称</th> |
| | | <th>次数</th> |
| | | <th width="100px">服务时长(分钟)</th> |
| | | <th>服务时间</th> |
| | | <th width="300px">美疗师</th> |
| | |
| | | |
| | | <tr v-for="(item,index) in projService.serviceItems"> |
| | | <td>{{item.projInfo.name}}</td> |
| | | <td>{{item.count}}</td> |
| | | <td><el-input @change="changeTimeLength" v-model="item.projInfo.timeLength"></el-input></td> |
| | | |
| | | <td> |
| | |
| | | newSetting6.setCategory("店务配置"); |
| | | newSettings.add(newSetting6); |
| | | |
| | | ParameterSettings newSetting7=new ParameterSettings(); |
| | | newSetting7.setCode(AppConstance.SHOP_MANAGE_GIFTISFREE); |
| | | newSetting7.setName("赠送金额购买产品算赠送购买"); |
| | | newSetting7.setType(1); |
| | | newSetting7.setCategory("店务配置"); |
| | | newSettings.add(newSetting7); |
| | | |
| | | |
| | | for (ParameterSettings newSetting : newSettings) { |
| | | List<ParameterSettings> parameterSettings = parameterSettingsDao.selectByModel(newSetting); |