DeptAPIService.java 1.22 KB
package com.huaheng.pc.u8.service;



import com.huaheng.api.general.service.BasicDataApiService;
import com.huaheng.framework.web.domain.AjaxResult;
import com.huaheng.pc.config.warehouseCompany.service.WarehouseCompanyService;

import com.huaheng.pc.system.dept.domain.Dept;
import com.huaheng.pc.system.dept.service.IDeptService;
import com.huaheng.pc.u8.domain.ICSDepartmentModel;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.Date;

@Service
public class DeptAPIService {
    @Resource
    IDeptService iDeptService;

    @Resource
    private WarehouseCompanyService warehouseCompanyService;

    @Autowired
    BasicDataApiService basicDataApiService;

    @Transactional
    public AjaxResult ICSDepartment(ICSDepartmentModel ICSDepartment) {
        Dept dept = new Dept();
        dept.setCode(ICSDepartment.getcDepCode());
        dept.setDeptName(ICSDepartment.getcDepName());
        dept.setCreateTime(new Date());
        dept.setUpdateTime(new Date());
        AjaxResult ajaxResult = basicDataApiService.dept(dept);
        return ajaxResult;

    }
}