wzy
2021-01-30 5a5e18d266370a7717db57c7275468868f29ed8e
Merge branch 'api' of https://gitee.com/jyyforjava/zq-erp into api
9 files modified
1 files added
96 ■■■■ changed files
zq-erp/.gitignore 1 ●●●● patch | view | raw | blame | history
zq-erp/pom.xml 4 ●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/hive/action/ProjServiceController.java 4 ●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/hive/bean/SysProjServices.java 2 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/hive/dao/SysProjServicesDao.java 7 ●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysOrderServiceImpl.java 8 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysProjServicesServiceImpl.java 10 ●●●● patch | view | raw | blame | history
zq-erp/src/main/resources/generated-sources/annotations/com/matrix/system/app/mapper/MoneyCardUseMapperImpl.java 52 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/resources/mybatis/mapper/hive/SysProjServicesDao.xml 2 ●●● patch | view | raw | blame | history
zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/updateServiceOrderTime.html 6 ●●●● patch | view | raw | blame | history
zq-erp/.gitignore
@@ -25,6 +25,7 @@
.idea/sqlDataSources.xml
.idea/dynamic.xml
.idea/uiDesigner.xml
*/resources/generated-sources/*
# Gradle:
.idea/gradle.xml
.idea/
zq-erp/pom.xml
@@ -390,11 +390,11 @@
                    <exclude>config/test/*</exclude>
                    <exclude>config/xcx/*</exclude>
                    <!---->
                    <!--
                    <exclude>config/config.json</exclude>
                    <exclude>config/application.properties</exclude>
                    <exclude>config/system.properties</exclude>
                    -->
zq-erp/src/main/java/com/matrix/system/hive/action/ProjServiceController.java
@@ -392,11 +392,11 @@
    public @ResponseBody
    AjaxResult updateOrderTime(SysProjServices serviceQuery) {
        SysProjServices services = sysProjServicesDao.selectById(serviceQuery.getId());
        sysProjServicesDao.updateOrderTime(serviceQuery.getCreateTime(), serviceQuery.getId());
        sysProjServicesDao.updateOrderTime(serviceQuery.getConsumeTime(), serviceQuery.getId());
        // 更新业绩时间
        AchieveNew achieveNew = new AchieveNew();
        achieveNew.setServiceOrderId(serviceQuery.getId());
        achieveNew.setDatatime(serviceQuery.getCreateTime());
        achieveNew.setDatatime(serviceQuery.getConsumeTime());
        achieveNewService.modifyAchieveTime(achieveNew);
        return new AjaxResult(AjaxResult.STATUS_SUCCESS, "修改成功");
    }
zq-erp/src/main/java/com/matrix/system/hive/bean/SysProjServices.java
@@ -43,6 +43,8 @@
    /**
     * 订单划扣时间
     */
    @JsonFormat(pattern = DateUtil.DATE_FORMAT_MM, timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
    private Date consumeTime;
    /**
zq-erp/src/main/java/com/matrix/system/hive/dao/SysProjServicesDao.java
@@ -1,15 +1,12 @@
package com.matrix.system.hive.dao;
import com.matrix.core.pojo.PaginationVO;
import com.matrix.system.app.dto.ServiceOrderListDto;
import com.matrix.system.app.vo.ServiceOrderListVo;
import com.matrix.system.hive.bean.SysProjServices;
import com.matrix.system.shopXcx.api.dto.ErpServiceOrderListDto;
import com.matrix.system.shopXcx.api.vo.ErpOrderDetailItemVo;
import com.matrix.system.shopXcx.api.vo.ErpServiceOrderListVo;
import org.apache.ibatis.annotations.Param;
import com.matrix.core.pojo.PaginationVO;
import java.util.Date;
import java.util.List;
@@ -39,7 +36,7 @@
    public SysProjServices  selectById(Long id);
    public void updateOrderTime(@Param("createTime") Date createTime, @Param("id") Long id);
    public void updateOrderTime(@Param("consumeTime") Date createTime, @Param("id") Long id);
    List<ServiceOrderListVo> selectApiServiceOrderListInPage(@Param("record") ServiceOrderListDto serviceOrderListDto, @Param("pageVo") PaginationVO pageVo);
zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysOrderServiceImpl.java
@@ -4,6 +4,7 @@
import com.matrix.core.constance.MatrixConstance;
import com.matrix.core.exception.GlobleException;
import com.matrix.core.pojo.PaginationVO;
import com.matrix.core.tools.DateUtil;
import com.matrix.core.tools.StringUtils;
import com.matrix.core.tools.WebUtil;
import com.matrix.system.app.dto.OrderListDto;
@@ -19,7 +20,6 @@
import com.matrix.system.hive.bean.*;
import com.matrix.system.hive.dao.*;
import com.matrix.system.hive.plugin.util.CollectionUtils;
import com.matrix.core.tools.DateUtil;
import com.matrix.system.hive.plugin.util.MoneyUtil;
import com.matrix.system.hive.pojo.CzXkVo;
import com.matrix.system.hive.pojo.ShoppingCarItem;
@@ -33,10 +33,11 @@
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import javax.servlet.http.HttpSession;
import javax.validation.constraints.NotEmpty;
import java.util.*;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
 * @date 2016-07-03 20:53
@@ -926,6 +927,7 @@
                    ShoppingGoods sysGoods = shoppingGoodsDao.selectById(outStoreItem.getSkuId());
                    if (sysGoods != null) {
                        throw new GlobleException("出库失败:【" + sysGoods.getName() + "库存不足】");
                    } else {
                        throw new GlobleException("出库失败没有找到出库产品");
                    }
zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysProjServicesServiceImpl.java
@@ -1,12 +1,14 @@
package com.matrix.system.hive.service.imp;
import com.alibaba.fastjson.JSONObject;
import com.matrix.component.rabbitmq.RabiitMqTemplate;
import com.matrix.core.constance.MatrixConstance;
import com.matrix.core.exception.GlobleException;
import com.matrix.core.pojo.PaginationVO;
import com.matrix.core.pojo.VerifyResult;
import com.matrix.core.tools.*;
import com.matrix.core.tools.DateUtil;
import com.matrix.core.tools.LogUtil;
import com.matrix.core.tools.StringUtils;
import com.matrix.core.tools.WebUtil;
import com.matrix.system.app.dto.ServiceOrderListDto;
import com.matrix.system.app.vo.ServiceOrderListVo;
import com.matrix.system.common.bean.SysUsers;
@@ -14,9 +16,7 @@
import com.matrix.system.constance.Dictionary;
import com.matrix.system.hive.bean.*;
import com.matrix.system.hive.dao.*;
import com.matrix.core.tools.DateUtil;
import com.matrix.system.hive.plugin.util.MoneyUtil;
import com.matrix.system.hive.pojo.MyBeauticianCount;
import com.matrix.system.hive.service.*;
import com.matrix.system.shopXcx.mqTask.MQTaskRouting;
import com.matrix.system.wechart.templateMsg.UniformMsgParam;
@@ -660,7 +660,7 @@
                    double sum = stores.stream().mapToDouble(item2 -> item2.getStoreTotal()).sum();
                    Double needAmount = MoneyUtil.div(item.getAmount(), Double.valueOf(shoppingGoods.getVolume()));
                    if (sum < needAmount) {
                        throw new GlobleException("出库失败:【" + shoppingGoods.getName() + "库存不足】");
                        throw new GlobleException("出库失败:【" + shoppingGoods.getName()+"-"+shoppingGoods.getCode()+  "库存不足】");
                    }
                    //循环获取所有批次产品,并扣减库存
                    for (SysStoreInfo storeInfo : stores) {
zq-erp/src/main/resources/generated-sources/annotations/com/matrix/system/app/mapper/MoneyCardUseMapperImpl.java
New file
@@ -0,0 +1,52 @@
package com.matrix.system.app.mapper;
import com.matrix.system.app.vo.VipCardListVo;
import com.matrix.system.hive.bean.MoneyCardUse;
import javax.annotation.Generated;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
@Generated(
    value = "org.mapstruct.ap.MappingProcessor",
    date = "2021-01-26T20:08:11+0800",
    comments = "version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_181 (Oracle Corporation)"
)
public class MoneyCardUseMapperImpl extends MoneyCardUseMapper {
    @Override
    public VipCardListVo entityToCardListVo(MoneyCardUse moneyCardUse) {
        if ( moneyCardUse == null ) {
            return null;
        }
        VipCardListVo vipCardListVo = new VipCardListVo();
        vipCardListVo.setCardName( moneyCardUse.getCardName() );
        if ( moneyCardUse.getRealMoney() != null ) {
            vipCardListVo.setRealMoney( BigDecimal.valueOf( moneyCardUse.getRealMoney() ) );
        }
        if ( moneyCardUse.getGiftMoney() != null ) {
            vipCardListVo.setGiftMoney( BigDecimal.valueOf( moneyCardUse.getGiftMoney() ) );
        }
        vipCardListVo.setStatus( moneyCardUse.getStatus() );
        vipCardListVo.setFailTime( moneyCardUse.getFailTime() );
        return vipCardListVo;
    }
    @Override
    public List<VipCardListVo> entitiesToCardListVos(List<MoneyCardUse> list) {
        if ( list == null ) {
            return null;
        }
        List<VipCardListVo> list1 = new ArrayList<VipCardListVo>( list.size() );
        for ( MoneyCardUse moneyCardUse : list ) {
            list1.add( entityToCardListVo( moneyCardUse ) );
        }
        return list1;
    }
}
zq-erp/src/main/resources/mybatis/mapper/hive/SysProjServicesDao.xml
@@ -140,7 +140,7 @@
    <!--  根据id更新 部分更新   -->
    <update id="updateOrderTime">
        UPDATE sys_proj_services set CREATE_TIME=#{createTime} WHERE id=#{id}
        UPDATE sys_proj_services set consume_time=#{consumeTime} WHERE id=#{id}
    </update>
    <!-- 设置服务单为已通知 -->
zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/updateServiceOrderTime.html
@@ -55,11 +55,11 @@
    
    <div class="form-group">
         
            <label class="col-sm-2 control-label">订单时间</label>
            <label class="col-sm-2 control-label">划扣时间</label>
            <div class="col-sm-4">
                <input autocomplete="off"   name="createTime" type="text"
                <input autocomplete="off"   name="consumeTime" type="text"
                    class="form-control  datetimepicker"
                       th:value="${#dates.format(serviceOrder.createTime, 'yyyy-MM-dd hh:mm')}"
                       th:value="${#dates.format(serviceOrder.consumeTime, 'yyyy-MM-dd hh:mm')}"
            </div>
    </div>