合并到主分支 #12
@@ -207,7 +207,7 @@ spring:
|
||||
connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000
|
||||
datasource:
|
||||
master:
|
||||
url: jdbc:mysql://121.40.189.20:3306/costmanage?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&useSSL=true&serverTimezone=Asia/Shanghai
|
||||
url: jdbc:mysql://121.40.189.20:3306/knne?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&useSSL=true&serverTimezone=Asia/Shanghai
|
||||
username: root
|
||||
password: YMzc157#
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
|
||||
+179
@@ -0,0 +1,179 @@
|
||||
package com.zzsmart.qomo.kn.cost.manage.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
import java.io.IOException;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLDecoder;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.zzsmart.qomo.kn.cost.manage.entity.CostPartMissingInfo;
|
||||
import com.zzsmart.qomo.kn.cost.manage.service.ICostPartMissingInfoService;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.system.query.QueryGenerator;
|
||||
import org.jeecg.common.util.oConvertUtils;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.jeecgframework.poi.excel.ExcelImportUtil;
|
||||
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
||||
import org.jeecgframework.poi.excel.entity.ExportParams;
|
||||
import org.jeecgframework.poi.excel.entity.ImportParams;
|
||||
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
|
||||
import org.jeecg.common.system.base.controller.JeecgController;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
|
||||
/**
|
||||
* @Description: 标准成本-部件缺失信息
|
||||
* @Author: wangqiong
|
||||
* @Date: 2024-06-13
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="标准成本-部件缺失信息")
|
||||
@RestController
|
||||
@RequestMapping("//costPartMissingInfo")
|
||||
@Slf4j
|
||||
public class CostPartMissingInfoController extends JeecgController<CostPartMissingInfo, ICostPartMissingInfoService> {
|
||||
@Autowired
|
||||
private ICostPartMissingInfoService costPartMissingInfoService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param costPartMissingInfo
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "cost_part_missing_info-分页列表查询")
|
||||
@ApiOperation(value="cost_part_missing_info-分页列表查询", notes="cost_part_missing_info-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<CostPartMissingInfo>> queryPageList(CostPartMissingInfo costPartMissingInfo,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<CostPartMissingInfo> queryWrapper = QueryGenerator.initQueryWrapper(costPartMissingInfo, req.getParameterMap());
|
||||
Page<CostPartMissingInfo> page = new Page<CostPartMissingInfo>(pageNo, pageSize);
|
||||
IPage<CostPartMissingInfo> pageList = costPartMissingInfoService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param costPartMissingInfo
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "cost_part_missing_info-添加")
|
||||
@ApiOperation(value="cost_part_missing_info-添加", notes="cost_part_missing_info-添加")
|
||||
// @RequiresPermissions(":cost_part_missing_info:add")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody CostPartMissingInfo costPartMissingInfo) {
|
||||
costPartMissingInfoService.save(costPartMissingInfo);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param costPartMissingInfo
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "cost_part_missing_info-编辑")
|
||||
@ApiOperation(value="cost_part_missing_info-编辑", notes="cost_part_missing_info-编辑")
|
||||
// @RequiresPermissions(":cost_part_missing_info:edit")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody CostPartMissingInfo costPartMissingInfo) {
|
||||
costPartMissingInfoService.updateById(costPartMissingInfo);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "cost_part_missing_info-通过id删除")
|
||||
@ApiOperation(value="cost_part_missing_info-通过id删除", notes="cost_part_missing_info-通过id删除")
|
||||
// @RequiresPermissions(":cost_part_missing_info:delete")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
costPartMissingInfoService.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "cost_part_missing_info-批量删除")
|
||||
@ApiOperation(value="cost_part_missing_info-批量删除", notes="cost_part_missing_info-批量删除")
|
||||
// @RequiresPermissions(":cost_part_missing_info:deleteBatch")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.costPartMissingInfoService.removeByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "cost_part_missing_info-通过id查询")
|
||||
@ApiOperation(value="cost_part_missing_info-通过id查询", notes="cost_part_missing_info-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<CostPartMissingInfo> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
CostPartMissingInfo costPartMissingInfo = costPartMissingInfoService.getById(id);
|
||||
if(costPartMissingInfo==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(costPartMissingInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param costPartMissingInfo
|
||||
*/
|
||||
// @RequiresPermissions(":cost_part_missing_info:exportXls")
|
||||
@RequestMapping(value = "/exportXls",method = RequestMethod.GET)
|
||||
public ModelAndView exportXls(HttpServletRequest request, CostPartMissingInfo costPartMissingInfo) {
|
||||
return super.exportXls(request, costPartMissingInfo, CostPartMissingInfo.class, "cost_part_missing_info");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
// @RequiresPermissions(":cost_part_missing_info:importExcel")
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, CostPartMissingInfo.class);
|
||||
}
|
||||
|
||||
}
|
||||
+182
@@ -0,0 +1,182 @@
|
||||
package com.zzsmart.qomo.kn.cost.manage.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
import java.io.IOException;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLDecoder;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.zzsmart.qomo.kn.cost.manage.entity.CostStandard;
|
||||
import com.zzsmart.qomo.kn.cost.manage.service.ICostStandardService;
|
||||
import com.zzsmart.qomo.kn.cost.manage.vo.CostStandardVO;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.system.query.QueryGenerator;
|
||||
import org.jeecg.common.util.oConvertUtils;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.jeecgframework.poi.excel.ExcelImportUtil;
|
||||
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
||||
import org.jeecgframework.poi.excel.entity.ExportParams;
|
||||
import org.jeecgframework.poi.excel.entity.ImportParams;
|
||||
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
|
||||
import org.jeecg.common.system.base.controller.JeecgController;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
|
||||
/**
|
||||
* @Description: 标准成本
|
||||
* @Author: wangqiong
|
||||
* @Date: 2024-06-13
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="标准成本计算")
|
||||
@RestController
|
||||
@RequestMapping("//costStandard")
|
||||
@Slf4j
|
||||
public class CostStandardController extends JeecgController<CostStandard, ICostStandardService> {
|
||||
@Autowired
|
||||
private ICostStandardService costStandardService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param costStandard
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "cost_standard-分页列表查询")
|
||||
@ApiOperation(value="cost_standard-分页列表查询", notes="cost_standard-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<CostStandardVO>> queryPageList(CostStandardVO costStandard,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
|
||||
Page<CostStandardVO> page = new Page<CostStandardVO>(pageNo, pageSize);
|
||||
IPage<CostStandardVO> pageList = costStandardService.pageList(page, costStandard);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param costStandard
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "cost_standard-添加")
|
||||
@ApiOperation(value="cost_standard-添加", notes="cost_standard-添加")
|
||||
// @RequiresPermissions(":cost_standard:add")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody CostStandard costStandard) {
|
||||
costStandardService.save(costStandard);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param costStandard
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "cost_standard-编辑")
|
||||
@ApiOperation(value="cost_standard-编辑", notes="cost_standard-编辑")
|
||||
// @RequiresPermissions(":cost_standard:edit")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody CostStandard costStandard) {
|
||||
costStandardService.updateById(costStandard);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "cost_standard-通过id删除")
|
||||
@ApiOperation(value="cost_standard-通过id删除", notes="cost_standard-通过id删除")
|
||||
// @RequiresPermissions(":cost_standard:delete")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
costStandardService.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "cost_standard-批量删除")
|
||||
@ApiOperation(value="cost_standard-批量删除", notes="cost_standard-批量删除")
|
||||
// @RequiresPermissions(":cost_standard:deleteBatch")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.costStandardService.removeByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "cost_standard-通过id查询")
|
||||
@ApiOperation(value="cost_standard-通过id查询", notes="cost_standard-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<CostStandard> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
CostStandard costStandard = costStandardService.getById(id);
|
||||
if(costStandard==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(costStandard);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param costStandard
|
||||
*/
|
||||
// @RequiresPermissions(":cost_standard:exportXls")
|
||||
@RequestMapping(value = "/exportXls", method = RequestMethod.GET)
|
||||
public ModelAndView exportXls(HttpServletRequest request, CostStandard costStandard) {
|
||||
return super.exportXls(request, costStandard, CostStandard.class, "cost_standard");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
// @RequiresPermissions(":cost_standard:importExcel")
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, CostStandard.class);
|
||||
}
|
||||
|
||||
}
|
||||
+181
@@ -0,0 +1,181 @@
|
||||
package com.zzsmart.qomo.kn.cost.manage.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
import java.io.IOException;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLDecoder;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.zzsmart.qomo.kn.cost.manage.entity.CostStandard;
|
||||
import com.zzsmart.qomo.kn.cost.manage.entity.CostStandardVersion;
|
||||
import com.zzsmart.qomo.kn.cost.manage.service.ICostStandardVersionService;
|
||||
import com.zzsmart.qomo.kn.cost.manage.vo.CostStandardVO;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.system.query.QueryGenerator;
|
||||
import org.jeecg.common.util.oConvertUtils;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.jeecgframework.poi.excel.ExcelImportUtil;
|
||||
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
||||
import org.jeecgframework.poi.excel.entity.ExportParams;
|
||||
import org.jeecgframework.poi.excel.entity.ImportParams;
|
||||
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
|
||||
import org.jeecg.common.system.base.controller.JeecgController;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
|
||||
/**
|
||||
* @Description: 标准成本-版本号
|
||||
* @Author: wangqiong
|
||||
* @Date: 2024-06-13
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="标准成本-版本号")
|
||||
@RestController
|
||||
@RequestMapping("//costStandardVersion")
|
||||
@Slf4j
|
||||
public class CostStandardVersionController extends JeecgController<CostStandardVersion, ICostStandardVersionService> {
|
||||
@Autowired
|
||||
private ICostStandardVersionService costStandardVersionService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param costStandardVersion
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "cost_standard_version-分页列表查询")
|
||||
@ApiOperation(value="cost_standard_version-分页列表查询", notes="cost_standard_version-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<CostStandardVersion>> queryPageList(CostStandardVersion costStandardVersion,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<CostStandardVersion> queryWrapper = QueryGenerator.initQueryWrapper(costStandardVersion, req.getParameterMap());
|
||||
Page<CostStandardVersion> page = new Page<CostStandardVersion>(pageNo, pageSize);
|
||||
IPage<CostStandardVersion> pageList = costStandardVersionService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param costStandardVersion
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "cost_standard_version-添加")
|
||||
@ApiOperation(value="cost_standard_version-添加", notes="cost_standard_version-添加")
|
||||
// @RequiresPermissions(":cost_standard_version:add")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody CostStandardVersion costStandardVersion) {
|
||||
costStandardVersionService.save(costStandardVersion);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param costStandardVersion
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "cost_standard_version-编辑")
|
||||
@ApiOperation(value="cost_standard_version-编辑", notes="cost_standard_version-编辑")
|
||||
// @RequiresPermissions(":cost_standard_version:edit")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody CostStandardVersion costStandardVersion) {
|
||||
costStandardVersionService.updateById(costStandardVersion);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "cost_standard_version-通过id删除")
|
||||
@ApiOperation(value="cost_standard_version-通过id删除", notes="cost_standard_version-通过id删除")
|
||||
// @RequiresPermissions(":cost_standard_version:delete")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
costStandardVersionService.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "cost_standard_version-批量删除")
|
||||
@ApiOperation(value="cost_standard_version-批量删除", notes="cost_standard_version-批量删除")
|
||||
// @RequiresPermissions(":cost_standard_version:deleteBatch")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.costStandardVersionService.removeByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "cost_standard_version-通过id查询")
|
||||
@ApiOperation(value="cost_standard_version-通过id查询", notes="cost_standard_version-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<CostStandardVersion> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
CostStandardVersion costStandardVersion = costStandardVersionService.getById(id);
|
||||
if(costStandardVersion==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(costStandardVersion);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param costStandardVersion
|
||||
*/
|
||||
// @RequiresPermissions(":cost_standard_version:exportXls")
|
||||
@RequestMapping(value = "/exportXls", method = RequestMethod.GET)
|
||||
public ModelAndView exportXls(HttpServletRequest request, CostStandardVersion costStandardVersion) {
|
||||
return super.exportXls(request, costStandardVersion, CostStandardVersion.class, "cost_standard_version");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
// @RequiresPermissions(":cost_standard_version:importExcel")
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, CostStandardVersion.class);
|
||||
}
|
||||
|
||||
}
|
||||
+1
-1
@@ -133,9 +133,9 @@ public class ProduceBatchController extends JeecgController<ProduceBatch, IProdu
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.produceBatchService.removeByIds(Arrays.asList(ids.split(",")));
|
||||
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
|
||||
+55
@@ -0,0 +1,55 @@
|
||||
package com.zzsmart.qomo.kn.cost.manage.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.jeecg.common.aspect.annotation.Dict;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* @Description: 标准成本-部件缺失信息
|
||||
* @Author: wangqiong
|
||||
* @Date: 2024-06-13
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("cost_part_missing_info")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="cost_part_missing_info对象", description="cost_part_missing_info")
|
||||
public class CostPartMissingInfo implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**id*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "id")
|
||||
private Integer id;
|
||||
/**标准成本表主键id*/
|
||||
@Excel(name = "标准成本表主键id", width = 15)
|
||||
@ApiModelProperty(value = "标准成本表主键id")
|
||||
private Integer costStandardId;
|
||||
/**物料号*/
|
||||
@Excel(name = "物料号", width = 15)
|
||||
@ApiModelProperty(value = "物料号")
|
||||
private String materialNumber;
|
||||
/**版本号*/
|
||||
@Excel(name = "版本号", width = 15)
|
||||
@ApiModelProperty(value = "版本号")
|
||||
private String versionNumber;
|
||||
/**缺失信息*/
|
||||
@Excel(name = "缺失信息", width = 15)
|
||||
@ApiModelProperty(value = "缺失信息")
|
||||
private String missingInfo;
|
||||
}
|
||||
+132
@@ -0,0 +1,132 @@
|
||||
package com.zzsmart.qomo.kn.cost.manage.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.jeecg.common.aspect.annotation.Dict;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* @Description: 标准成本
|
||||
* @Author: wangqiong
|
||||
* @Date: 2024-06-13
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("cost_standard")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="cost_standard对象", description="cost_standard")
|
||||
public class CostStandard implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**id*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "id")
|
||||
private Integer id;
|
||||
/**物料号*/
|
||||
@Excel(name = "物料号", width = 15)
|
||||
@ApiModelProperty(value = "物料号")
|
||||
private String materialNumber;
|
||||
|
||||
/**版本号ID*/
|
||||
@Excel(name = "版本号ID", width = 15)
|
||||
@ApiModelProperty(value = "版本号ID")
|
||||
private Integer versionNumberId;
|
||||
|
||||
/**bom材料费*/
|
||||
@Excel(name = "bom材料费", width = 15)
|
||||
@ApiModelProperty(value = "bom材料费")
|
||||
private BigDecimal bomCost;
|
||||
/**包装费*/
|
||||
@Excel(name = "包装费", width = 15)
|
||||
@ApiModelProperty(value = "包装费")
|
||||
private BigDecimal packingCost;
|
||||
/**辅料费*/
|
||||
@Excel(name = "辅料费", width = 15)
|
||||
@ApiModelProperty(value = "辅料费")
|
||||
private BigDecimal auxiliaryCost;
|
||||
/**人工费*/
|
||||
@Excel(name = "人工费", width = 15)
|
||||
@ApiModelProperty(value = "人工费")
|
||||
private BigDecimal laborCost;
|
||||
/**机器折旧费*/
|
||||
@Excel(name = "机器折旧费", width = 15)
|
||||
@ApiModelProperty(value = "机器折旧费")
|
||||
private BigDecimal euipDepreciationCost;
|
||||
/**机物料消耗费*/
|
||||
@Excel(name = "机物料消耗费", width = 15)
|
||||
@ApiModelProperty(value = "机物料消耗费")
|
||||
private BigDecimal equipConsumeCost;
|
||||
/**水电费*/
|
||||
@Excel(name = "水电费", width = 15)
|
||||
@ApiModelProperty(value = "水电费")
|
||||
private BigDecimal hydroelectricityCost;
|
||||
/**其他制造费*/
|
||||
@Excel(name = "其他制造费", width = 15)
|
||||
@ApiModelProperty(value = "其他制造费")
|
||||
private BigDecimal otherCost;
|
||||
/**物流费*/
|
||||
@Excel(name = "物流费", width = 15)
|
||||
@ApiModelProperty(value = "物流费")
|
||||
private BigDecimal trailCost;
|
||||
/**制造成本*/
|
||||
@Excel(name = "制造成本", width = 15)
|
||||
@ApiModelProperty(value = "制造成本")
|
||||
private BigDecimal manufactureCost;
|
||||
/**工装费*/
|
||||
@Excel(name = "工装费", width = 15)
|
||||
@ApiModelProperty(value = "工装费")
|
||||
private BigDecimal toolingCost;
|
||||
/**检具费*/
|
||||
@Excel(name = "检具费", width = 15)
|
||||
@ApiModelProperty(value = "检具费")
|
||||
private BigDecimal inspectionCost;
|
||||
/**模具费*/
|
||||
@Excel(name = "模具费", width = 15)
|
||||
@ApiModelProperty(value = "模具费")
|
||||
private BigDecimal moldCost;
|
||||
/**测试费*/
|
||||
@Excel(name = "测试费", width = 15)
|
||||
@ApiModelProperty(value = "测试费")
|
||||
private BigDecimal testCost;
|
||||
/**总成本*/
|
||||
@Excel(name = "总成本", width = 15)
|
||||
@ApiModelProperty(value = "总成本")
|
||||
private BigDecimal totalCost;
|
||||
/**创建人*/
|
||||
@Excel(name = "创建人", width = 15)
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private String createBy;
|
||||
/**创建日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "创建日期")
|
||||
private Date createTime;
|
||||
/**修改人*/
|
||||
@Excel(name = "修改人", width = 15)
|
||||
@ApiModelProperty(value = "修改人")
|
||||
private String updateBy;
|
||||
/**修改日期*/
|
||||
@Excel(name = "修改日期", width = 20, format = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "修改日期")
|
||||
private Date updateTime;
|
||||
/**备注*/
|
||||
@Excel(name = "备注", width = 15)
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String remark;
|
||||
}
|
||||
+86
@@ -0,0 +1,86 @@
|
||||
package com.zzsmart.qomo.kn.cost.manage.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.jeecg.common.aspect.annotation.Dict;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* @Description: 标准成本-版本号
|
||||
* @Author: wangqiong
|
||||
* @Date: 2024-06-13
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("cost_standard_version")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="cost_standard_version对象", description="cost_standard_version")
|
||||
public class CostStandardVersion implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**id*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "id")
|
||||
private Integer id;
|
||||
|
||||
/**图号*/
|
||||
@ApiModelProperty(value = "图号")
|
||||
private String figureNumber;
|
||||
/**阶段,A-初始,B-首批,C-量产*/
|
||||
@Excel(name = "阶段", width = 15)
|
||||
@ApiModelProperty(value = "阶段")
|
||||
private String stage;
|
||||
/**物料号*/
|
||||
@Excel(name = "物料号", width = 15)
|
||||
@ApiModelProperty(value = "物料号")
|
||||
private String materialNumber;
|
||||
/**版本号*/
|
||||
@Excel(name = "版本号", width = 15)
|
||||
@ApiModelProperty(value = "版本号")
|
||||
private String versionNumber;
|
||||
/**版本状态*/
|
||||
@Excel(name = "版本状态", width = 15)
|
||||
@ApiModelProperty(value = "版本状态")
|
||||
private String versionStatus;
|
||||
/**创建人*/
|
||||
@Excel(name = "创建人", width = 15)
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private String createBy;
|
||||
/**创建时间*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private Date createTime;
|
||||
/**修改人*/
|
||||
@Excel(name = "修改人", width = 15)
|
||||
@ApiModelProperty(value = "修改人")
|
||||
private String updateBy;
|
||||
/**修改时间*/
|
||||
@Excel(name = "修改时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "修改时间")
|
||||
private Date updateTime;
|
||||
/**备注*/
|
||||
@Excel(name = "备注", width = 15)
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String remark;
|
||||
/**年份*/
|
||||
@Excel(name = "年份", width = 15)
|
||||
@ApiModelProperty(value = "年份")
|
||||
private String versionYear;
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
package com.zzsmart.qomo.kn.cost.manage.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.zzsmart.qomo.kn.cost.manage.entity.CostPartMissingInfo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 标准成本-部件缺失信息
|
||||
* @Author: wangqiong
|
||||
* @Date: 2024-06-13
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface CostPartMissingInfoMapper extends BaseMapper<CostPartMissingInfo> {
|
||||
|
||||
}
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
package com.zzsmart.qomo.kn.cost.manage.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.zzsmart.qomo.kn.cost.manage.entity.CostStandard;
|
||||
import com.zzsmart.qomo.kn.cost.manage.vo.CostStandardVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 标准成本
|
||||
* @Author: wangqiong
|
||||
* @Date: 2024-06-13
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface CostStandardMapper extends BaseMapper<CostStandard> {
|
||||
|
||||
IPage<CostStandardVO> pageList(@Param("page")Page<CostStandardVO> page , @Param(Constants.WRAPPER) Wrapper<CostStandardVO> wrapper);
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
package com.zzsmart.qomo.kn.cost.manage.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.zzsmart.qomo.kn.cost.manage.entity.CostStandardVersion;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 标准成本-版本号
|
||||
* @Author: wangqiong
|
||||
* @Date: 2024-06-13
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface CostStandardVersionMapper extends BaseMapper<CostStandardVersion> {
|
||||
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zzsmart.qomo.kn.cost.manage.mapper.CostPartMissingInfoMapper">
|
||||
|
||||
</mapper>
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zzsmart.qomo.kn.cost.manage.mapper.CostStandardMapper">
|
||||
<resultMap id="CostStandardVOResultMap" type="com.zzsmart.qomo.kn.cost.manage.vo.CostStandardVO" >
|
||||
<result column="id" property="id" />
|
||||
<result column="material_number" property="materialNumber" />
|
||||
<result column="version_number" property="versionNumber" />
|
||||
<result column="version_number_id" property="versionNumberId" />
|
||||
<result column="bom_cost" property="bomCost" />
|
||||
<result column="packing_cost" property="packingCost" />
|
||||
<result column="auxiliary_cost" property="auxiliaryCost" />
|
||||
<result column="labor_cost" property="laborCost" />
|
||||
<result column="euip_depreciation_cost" property="euipDepreciationCost" />
|
||||
<result column="equip_consume_cost" property="equipConsumeCost" />
|
||||
<result column="hydroelectricity_cost" property="hydroelectricityCost" />
|
||||
<result column="other_cost" property="otherCost" />
|
||||
<result column="trail_cost" property="trailCost" />
|
||||
<result column="manufacture_cost" property="manufactureCost" />
|
||||
<result column="tooling_cost" property="toolingCost" />
|
||||
<result column="Inspection_cost" property="inspectionCost" />
|
||||
<result column="mold_cost" property="moldCost" />
|
||||
<result column="test_cost" property="testCost" />
|
||||
<result column="total_cost" property="totalCost" />
|
||||
<result column="create_by" property="createBy" />
|
||||
<result column="create_time" property="createTime" />
|
||||
<result column="update_by" property="updateBy" />
|
||||
<result column="update_time" property="updateTime" />
|
||||
<result column="remark" property="remark" />
|
||||
<result column="version_status" property="versionStatus" />
|
||||
<result column="stage" property="stage" />
|
||||
<result column="version_year" property="versionYear" />
|
||||
</resultMap>
|
||||
<select id="pageList" resultMap="CostStandardVOResultMap">
|
||||
select c1.*, c2.version_number, c2.version_status, c2.stage,c2.version_year
|
||||
from
|
||||
cost_standard c1
|
||||
left join cost_standard_version c2 on c1.version_number_id = c2.id
|
||||
${ew.customSqlSegment}
|
||||
ORDER BY c1.create_time desc
|
||||
|
||||
</select>
|
||||
</mapper>
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zzsmart.qomo.kn.cost.manage.mapper.CostStandardVersionMapper">
|
||||
|
||||
</mapper>
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
package com.zzsmart.qomo.kn.cost.manage.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.zzsmart.qomo.kn.cost.manage.entity.CostPartMissingInfo;
|
||||
|
||||
/**
|
||||
* @Description: 标准成本-部件缺失信息
|
||||
* @Author: wangqiong
|
||||
* @Date: 2024-06-13
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface ICostPartMissingInfoService extends IService<CostPartMissingInfo> {
|
||||
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
package com.zzsmart.qomo.kn.cost.manage.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.zzsmart.qomo.kn.cost.manage.entity.CostStandard;
|
||||
import com.zzsmart.qomo.kn.cost.manage.vo.CostStandardVO;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
/**
|
||||
* @Description: 标准成本
|
||||
* @Author: wangqiong
|
||||
* @Date: 2024-06-13
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface ICostStandardService extends IService<CostStandard> {
|
||||
/**
|
||||
* 分页查询
|
||||
* @param page
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
IPage<CostStandardVO> pageList(Page<CostStandardVO> page, CostStandardVO costStandard);
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package com.zzsmart.qomo.kn.cost.manage.service;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.zzsmart.qomo.kn.cost.manage.entity.CostStandardVersion;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 标准成本-版本号
|
||||
* @Author: wangqiong
|
||||
* @Date: 2024-06-13
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface ICostStandardVersionService extends IService<CostStandardVersion> {
|
||||
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
package com.zzsmart.qomo.kn.cost.manage.service.impl;
|
||||
|
||||
|
||||
import com.zzsmart.qomo.kn.cost.manage.entity.CostPartMissingInfo;
|
||||
import com.zzsmart.qomo.kn.cost.manage.mapper.CostPartMissingInfoMapper;
|
||||
import com.zzsmart.qomo.kn.cost.manage.service.ICostPartMissingInfoService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
/**
|
||||
* @Description: 标准成本-部件缺失信息
|
||||
* @Author: wangqiong
|
||||
* @Date: 2024-06-13
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class CostPartMissingInfoServiceImpl extends ServiceImpl<CostPartMissingInfoMapper, CostPartMissingInfo> implements ICostPartMissingInfoService {
|
||||
|
||||
}
|
||||
+60
@@ -0,0 +1,60 @@
|
||||
package com.zzsmart.qomo.kn.cost.manage.service.impl;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.zzsmart.qomo.kn.cost.manage.entity.CostStandard;
|
||||
import com.zzsmart.qomo.kn.cost.manage.mapper.CostStandardMapper;
|
||||
import com.zzsmart.qomo.kn.cost.manage.service.ICostStandardService;
|
||||
import com.zzsmart.qomo.kn.cost.manage.vo.CostStandardVO;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Description: 标准成本
|
||||
* @Author: wangqiong
|
||||
* @Date: 2024-06-13
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class CostStandardServiceImpl extends ServiceImpl<CostStandardMapper, CostStandard> implements ICostStandardService {
|
||||
@Autowired
|
||||
private CostStandardMapper costStandardMapper;
|
||||
|
||||
@Override
|
||||
public IPage<CostStandardVO> pageList(Page<CostStandardVO> page, CostStandardVO costStandard) {
|
||||
// 查询条件组装
|
||||
QueryWrapper queryWrapper = new QueryWrapper();
|
||||
|
||||
if(costStandard != null){
|
||||
if(StrUtil.isNotEmpty(costStandard.getVersionYear()) ){
|
||||
// 年份
|
||||
queryWrapper.eq("c2.version_year",costStandard.getVersionYear());
|
||||
}
|
||||
if(StrUtil.isNotEmpty(costStandard.getStage()) ){
|
||||
// 阶段
|
||||
queryWrapper.eq("c2.stage",costStandard.getStage());
|
||||
}
|
||||
if(StrUtil.isNotEmpty(costStandard.getMaterialNumber()) ){
|
||||
// 物料号
|
||||
queryWrapper.like("c1.material_number",costStandard.getMaterialNumber());
|
||||
}
|
||||
if(StrUtil.isNotEmpty(costStandard.getVersionNumber()) ){
|
||||
// 版本号
|
||||
queryWrapper.like("c2.version_number",costStandard.getVersionNumber());
|
||||
}
|
||||
if(StrUtil.isNotEmpty(costStandard.getVersionStatus()) ){
|
||||
// 版本状态
|
||||
queryWrapper.eq("c2.version_status",costStandard.getVersionStatus());
|
||||
}
|
||||
}
|
||||
return (IPage<CostStandardVO>) costStandardMapper.pageList(page,queryWrapper);
|
||||
}
|
||||
}
|
||||
+87
@@ -0,0 +1,87 @@
|
||||
package com.zzsmart.qomo.kn.cost.manage.service.impl;
|
||||
|
||||
|
||||
|
||||
import com.zzsmart.qomo.kn.cost.manage.entity.CostStandard;
|
||||
import com.zzsmart.qomo.kn.cost.manage.entity.CostStandardVersion;
|
||||
import com.zzsmart.qomo.kn.cost.manage.mapper.CostStandardMapper;
|
||||
import com.zzsmart.qomo.kn.cost.manage.mapper.CostStandardVersionMapper;
|
||||
import com.zzsmart.qomo.kn.cost.manage.service.ICostStandardVersionService;
|
||||
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.jeecg.common.system.vo.LoginUser;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 标准成本-版本号
|
||||
* @Author: wangqiong
|
||||
* @Date: 2024-06-13
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class CostStandardVersionServiceImpl extends ServiceImpl<CostStandardVersionMapper, CostStandardVersion> implements ICostStandardVersionService {
|
||||
@Autowired
|
||||
private CostStandardMapper costStandardMapper;
|
||||
@Transactional
|
||||
@Override
|
||||
public boolean save(CostStandardVersion costStandardVersion) {
|
||||
LoginUser sysUser = null;
|
||||
try {
|
||||
sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
} catch (Exception ignored) {
|
||||
|
||||
}
|
||||
if(sysUser!=null){
|
||||
costStandardVersion.setCreateBy(sysUser.getUsername());
|
||||
}
|
||||
// 保存版本号表
|
||||
boolean save = super.save(costStandardVersion);
|
||||
// todo 标准成本计算,并且设置字段对应值(计算时版本状态为枚举,比如计算中,计算终止,计算出错,已完成)
|
||||
CostStandard standard= standardCalculate(costStandardVersion);
|
||||
// standard.setMaterialNumber(costStandardVersion.getMaterialNumber());
|
||||
// standard.setVersionNumberId(costStandardVersion.getId());
|
||||
// if(sysUser!=null){
|
||||
// standard.setCreateBy(sysUser.getUsername());
|
||||
// }
|
||||
// standard.setCreateTime(new Date());
|
||||
// // 保存标准成本表
|
||||
// costStandardMapper.insert(standard);
|
||||
return save;
|
||||
}
|
||||
|
||||
/**
|
||||
* 标准成本计算
|
||||
* @param costStandardVersion 版本号
|
||||
* @return
|
||||
*/
|
||||
private CostStandard standardCalculate(CostStandardVersion costStandardVersion) {
|
||||
CostStandard standard = new CostStandard();
|
||||
// todo 1,查工序
|
||||
// 2, 查时间
|
||||
// 3,查费率
|
||||
// 4,计算bom费用,BOM表清单物料用量*采购单价
|
||||
// 5,计算包装费
|
||||
// 6,计算辅料费
|
||||
// 7,计算人工费,人工工时*费率
|
||||
// 8,计算机器折旧费,机器工时*费率
|
||||
// 9,计算机物料消耗费,辅料工时*费率
|
||||
// 10,计算水电费,燃动力工时*费率
|
||||
// 11,计算其他制造费,其他工时*费率
|
||||
// 12,计算物流费,物流费用=(机器折旧+机物料消耗+水电费+其他制费)*10.16%
|
||||
// 13,计算制造成本,前面所有费用汇总(即bom费+包装费+辅料费+人工费+机器折旧费+机物料消耗费+水电费+其他制造费+物流费)
|
||||
// 14,计算工装费
|
||||
// 15,计算检具费
|
||||
// 16,计算模具费
|
||||
// 17,计算测试费
|
||||
// 18,计算总成本
|
||||
|
||||
return standard;
|
||||
}
|
||||
}
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
package com.zzsmart.qomo.kn.cost.manage.vo;
|
||||
|
||||
|
||||
import com.zzsmart.qomo.kn.cost.manage.entity.CostStandard;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
|
||||
/**
|
||||
* @Classname CostStandardVO
|
||||
* @Description 标准成本列表出参
|
||||
* @Version 1.0.0
|
||||
* @Date 2024/6/13 15:51
|
||||
* @Created wangqiong
|
||||
*/
|
||||
@Data
|
||||
public class CostStandardVO extends CostStandard implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**年份*/
|
||||
@ApiModelProperty(value = "年份")
|
||||
private String versionYear;
|
||||
/**版本状态*/
|
||||
@ApiModelProperty(value = "版本状态")
|
||||
private String versionStatus;
|
||||
/**阶段,A-初始,B-首批,C-量产*/
|
||||
@ApiModelProperty(value = "阶段")
|
||||
private String stage;
|
||||
/**版本号*/
|
||||
@ApiModelProperty(value = "版本号")
|
||||
private String versionNumber;
|
||||
}
|
||||
Reference in New Issue
Block a user