935090232@qq.com
2021-11-21 59634aeabb04aae0e819bd4c5fe909bb9cdbeb28
zq-erp/src/main/java/com/matrix/system/hive/action/ProjServiceController.java
@@ -1,5 +1,6 @@
package com.matrix.system.hive.action;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.StrUtil;
import com.matrix.core.anotations.RemoveRequestToken;
@@ -26,17 +27,16 @@
import com.matrix.system.constance.Dictionary;
import com.matrix.system.hive.bean.*;
import com.matrix.system.hive.dao.*;
import com.matrix.system.hive.dto.ServiceOrderTimeDto;
import com.matrix.system.hive.service.*;
import com.matrix.system.hive.vo.ServiceOrderInfoVo;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.collections.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
import javax.annotation.Resource;
@@ -143,6 +143,20 @@
        result.setStatus(AjaxResult.STATUS_SUCCESS);
        return result;
    }
    /**
     * 根据id查询服务单简单信息
     */
    @RequestMapping(value = "/findServiceOrderInfoVo/{id}")
    public @ResponseBody
    AjaxResult findServiceOrderInfoVo(@PathVariable Long id) {
        // 获取服务单信息
        SysProjServices projServices = sysProjServicesService.findById(id);
        ServiceOrderInfoVo serviceOrderInfoVo= BeanUtil.copyProperties(projServices,ServiceOrderInfoVo.class);
        return AjaxResult.buildSuccessInstance(serviceOrderInfoVo);
    }
@@ -429,13 +443,12 @@
     */
    @RequestMapping(value = "/updateOrderTime")
    public @ResponseBody
    AjaxResult updateOrderTime(SysProjServices serviceQuery) {
        SysProjServices services = sysProjServicesDao.selectById(serviceQuery.getId());
        sysProjServicesDao.updateOrderTime(serviceQuery.getConsumeTime(), serviceQuery.getId());
    AjaxResult updateOrderTime(@RequestBody  ServiceOrderTimeDto serviceOrderTimeDto) {
        sysProjServicesDao.updateOrderTime(serviceOrderTimeDto);
        // 更新业绩时间
        AchieveNew achieveNew = new AchieveNew();
        achieveNew.setServiceOrderId(serviceQuery.getId());
        achieveNew.setDatatime(serviceQuery.getConsumeTime());
        achieveNew.setServiceOrderId(serviceOrderTimeDto.getId());
        achieveNew.setDatatime(serviceOrderTimeDto.getConsumeTime());
        achieveNewService.modifyAchieveTime(achieveNew);
        return new AjaxResult(AjaxResult.STATUS_SUCCESS, "修改成功");
    }