Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
4be6477f7c
|
|
@ -109,9 +109,6 @@ public class MaterialConstants {
|
|||
*/
|
||||
public static final Integer TEN_CONSTANT = 10;
|
||||
|
||||
// 营业执照 FILE_TYPE
|
||||
public static final Long FILE_TYPE_YINGYEZHIZHAO = 4L;
|
||||
|
||||
// 物资厂家管理任务类型 TASK_TYPE
|
||||
public static final Long TASK_TYPE_WUZI_CHANGJIA = 9L;
|
||||
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ public class BmFileInfoController extends BaseController
|
|||
列表
|
||||
*/
|
||||
@ApiOperation(value = "查询附件列表")
|
||||
@RequiresPermissions("basic:info:list")
|
||||
@RequiresPermissions("basic:file:manage")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(BmFileInfo bmFileInfo)
|
||||
{
|
||||
|
|
@ -59,7 +59,7 @@ public class BmFileInfoController extends BaseController
|
|||
*/
|
||||
@ApiOperation(value = "导出附件列表")
|
||||
@PreventRepeatSubmit
|
||||
@RequiresPermissions("basic:info:export")
|
||||
@RequiresPermissions("basic:file:manage")
|
||||
@SysLog(title = "附件", businessType = OperaType.EXPORT, logType = 1,module = "仓储管理->导出附件")
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, BmFileInfo bmFileInfo)
|
||||
|
|
@ -74,7 +74,7 @@ public class BmFileInfoController extends BaseController
|
|||
详细信息
|
||||
*/
|
||||
@ApiOperation(value = "获取附件详细信息")
|
||||
@RequiresPermissions("basic:info:query")
|
||||
@RequiresPermissions("basic:file:manage")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
|
|
@ -87,7 +87,7 @@ public class BmFileInfoController extends BaseController
|
|||
*/
|
||||
@ApiOperation(value = "新增附件")
|
||||
@PreventRepeatSubmit
|
||||
@RequiresPermissions("basic:info:add")
|
||||
@RequiresPermissions("basic:file:manage")
|
||||
@SysLog(title = "附件", businessType = OperaType.INSERT, logType = 1,module = "仓储管理->新增附件")
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody BmFileInfo bmFileInfo)
|
||||
|
|
@ -101,7 +101,7 @@ public class BmFileInfoController extends BaseController
|
|||
*/
|
||||
@ApiOperation(value = "修改附件")
|
||||
@PreventRepeatSubmit
|
||||
@RequiresPermissions("basic:info:edit")
|
||||
@RequiresPermissions("basic:file:manage")
|
||||
@SysLog(title = "附件", businessType = OperaType.UPDATE, logType = 1,module = "仓储管理->修改附件")
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody BmFileInfo bmFileInfo)
|
||||
|
|
@ -115,7 +115,7 @@ public class BmFileInfoController extends BaseController
|
|||
*/
|
||||
@ApiOperation(value = "删除附件")
|
||||
@PreventRepeatSubmit
|
||||
@RequiresPermissions("basic:info:remove")
|
||||
@RequiresPermissions("basic:file:manage")
|
||||
@SysLog(title = "附件", businessType = OperaType.DELETE, logType = 1,module = "仓储管理->删除附件")
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
|
|
|
|||
|
|
@ -29,6 +29,11 @@ public class BmFileInfo extends BaseEntity
|
|||
@ApiModelProperty(value = "任务类型")
|
||||
private Long taskType;
|
||||
|
||||
/** 任务id */
|
||||
@Excel(name = "任务id")
|
||||
@ApiModelProperty(value = "任务id")
|
||||
private Long taskId;
|
||||
|
||||
/** 模块id */
|
||||
@Excel(name = "模块id")
|
||||
@ApiModelProperty(value = "模块id")
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package com.bonus.material.basic.mapper;
|
|||
|
||||
import java.util.List;
|
||||
import com.bonus.material.basic.domain.BmFileInfo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 附件Mapper接口
|
||||
|
|
@ -32,6 +33,8 @@ public interface BmFileInfoMapper {
|
|||
*/
|
||||
int insertBmFileInfo(BmFileInfo bmFileInfo);
|
||||
|
||||
int insertBmFileInfos(@Param("list") List<BmFileInfo> bmFileInfos);
|
||||
|
||||
/**
|
||||
* 修改附件
|
||||
*
|
||||
|
|
|
|||
|
|
@ -44,6 +44,8 @@ public interface IBmFileInfoService
|
|||
*/
|
||||
public int insertBmFileInfo(BmFileInfo bmFileInfo);
|
||||
|
||||
public int insertBmFileInfos(List<BmFileInfo> bmFileInfos);
|
||||
|
||||
/**
|
||||
* 修改附件
|
||||
|
||||
|
|
|
|||
|
|
@ -66,6 +66,13 @@ public class BmFileInfoServiceImpl implements IBmFileInfoService
|
|||
return bmFileInfoMapper.insertBmFileInfo(bmFileInfo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertBmFileInfos(List<BmFileInfo> bmFileInfos)
|
||||
{
|
||||
bmFileInfos.stream().forEach(o -> o.setCreateTime(DateUtils.getNowDate()));
|
||||
return bmFileInfoMapper.insertBmFileInfos(bmFileInfos);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改附件
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,21 @@
|
|||
package com.bonus.material.ma.controller;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import com.bonus.common.biz.config.ListPagingUtil;
|
||||
import com.bonus.common.core.utils.ServletUtils;
|
||||
import com.bonus.common.log.enums.OperaType;
|
||||
import com.bonus.material.common.annotation.PreventRepeatSubmit;
|
||||
import com.bonus.material.ma.domain.vo.MaTypeVo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.commons.lang3.BooleanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
|
|
@ -48,6 +57,28 @@ public class PartTypeController extends BaseController
|
|||
return partTypeService.selectPartTypeList(partType);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据左列表类型id查询右表格
|
||||
*
|
||||
* @param partType
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "根据左列表类型id查询右表格")
|
||||
@GetMapping("/getListByPartType")
|
||||
public AjaxResult getListByPartType(PartType partType) {
|
||||
List<Integer> parentIds = partTypeService.selectParentId(partType);
|
||||
if (CollectionUtils.isEmpty(parentIds)) {
|
||||
return AjaxResult.success(new ArrayList<>());
|
||||
}
|
||||
List<PartType> maTypeVos = new ArrayList<>();
|
||||
Integer pageIndex = Convert.toInt(ServletUtils.getParameter("pageNum"), 1);
|
||||
Integer pageSize = Convert.toInt(ServletUtils.getParameter("pageSize"), 10);
|
||||
for (Integer parentId : parentIds) {
|
||||
maTypeVos.addAll(partTypeService.getListByParentId(parentId.longValue(), partType));
|
||||
}
|
||||
return AjaxResult.success(ListPagingUtil.paging(pageIndex, pageSize, maTypeVos));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "配件类型所属上级树")
|
||||
@RequiresPermissions("ma:type:query")
|
||||
@GetMapping("/getPartTree")
|
||||
|
|
|
|||
|
|
@ -79,16 +79,11 @@ public class TypeController extends BaseController {
|
|||
for (Integer parentId : parentIds) {
|
||||
maTypeVos.addAll(typeService.getListByParentId(parentId.longValue(), maTypeVo));
|
||||
}
|
||||
List<MaTypeVo> updatedMaTypeVos = maTypeVos.stream()
|
||||
.map(obj -> {
|
||||
obj.setHouseId(maTypeVo.getHouseId());
|
||||
return obj;
|
||||
}).collect(Collectors.toList());
|
||||
if (BooleanUtils.isTrue(maTypeVo.getDisplayBindRelationship())) {
|
||||
List<MaTypeVo> finalMaTypeVos = typeService.getMyTypeAndBindUsers(updatedMaTypeVos);
|
||||
List<MaTypeVo> finalMaTypeVos = typeService.getMyTypeAndBindUsers(maTypeVos);
|
||||
return AjaxResult.success(ListPagingUtil.paging(pageIndex, pageSize, finalMaTypeVos));
|
||||
} else {
|
||||
return AjaxResult.success(ListPagingUtil.paging(pageIndex, pageSize, updatedMaTypeVos));
|
||||
return AjaxResult.success(ListPagingUtil.paging(pageIndex, pageSize, maTypeVos));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -153,6 +148,34 @@ public class TypeController extends BaseController {
|
|||
util.exportExcel(response, list, "物资类型管理数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出物资类型管理列表(库管员)
|
||||
*/
|
||||
@ApiOperation(value = "导出物资类型列表(库管员)")
|
||||
@PreventRepeatSubmit
|
||||
@RequiresPermissions("ma:type:export")
|
||||
@SysLog(title = "物资类型管理(库管员)", businessType = OperaType.EXPORT, module = "仓储管理->导出物资类型(库管员)")
|
||||
@PostMapping("/export4Keeper")
|
||||
public void export4Keeper(HttpServletResponse response, Type type) {
|
||||
List<Type> list = typeService.selectTypeList4Keeper(type);
|
||||
ExcelUtil<Type> util = new ExcelUtil<Type>(Type.class);
|
||||
util.exportExcel(response, list, "物资类型管理数据(库管员)");
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出物资类型管理列表(维修员)
|
||||
*/
|
||||
@ApiOperation(value = "导出物资类型列表(维修员)")
|
||||
@PreventRepeatSubmit
|
||||
@RequiresPermissions("ma:type:export")
|
||||
@SysLog(title = "物资类型管理(维修员)", businessType = OperaType.EXPORT, module = "仓储管理->导出物资类型(维修员)")
|
||||
@PostMapping("/export4Repair")
|
||||
public void export4Repair(HttpServletResponse response, Type type) {
|
||||
List<Type> list = typeService.selectTypeList4Repair(type);
|
||||
ExcelUtil<Type> util = new ExcelUtil<Type>(Type.class);
|
||||
util.exportExcel(response, list, "物资类型管理数据(维修员)");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取物资类型管理详细信息
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -35,6 +35,14 @@ public class Type extends BaseEntity {
|
|||
@ApiModelProperty(value = "类型名称")
|
||||
private String typeName;
|
||||
|
||||
/** 库管员昵称 */
|
||||
@ApiModelProperty(value = "库管员昵称")
|
||||
private String keeperNickName;
|
||||
|
||||
/** 维修员昵称 */
|
||||
@ApiModelProperty(value = "维修员昵称")
|
||||
private String repairNickName;
|
||||
|
||||
/** 仓库名称 */
|
||||
@ApiModelProperty(value = "物资仓库名称")
|
||||
private String houseName;
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@ import java.util.List;
|
|||
|
||||
import com.bonus.common.biz.domain.TreeNode;
|
||||
import com.bonus.material.ma.domain.PartType;
|
||||
import com.bonus.material.ma.domain.vo.MaTypeVo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 配件类型管理Mapper接口
|
||||
|
|
@ -87,4 +89,12 @@ public interface PartTypeMapper
|
|||
* @return
|
||||
*/
|
||||
int selectPart(Long id);
|
||||
|
||||
/**
|
||||
* 根据level层级和typeID 查询父级ID
|
||||
* @param partType
|
||||
*/
|
||||
List<Integer> selectParentId(PartType partType);
|
||||
|
||||
List<PartType> getListByTypeName(@Param("paId") Long id, @Param("type") PartType partType);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -59,6 +59,10 @@ public interface TypeMapper {
|
|||
*/
|
||||
List<Type> selectTypeList(Type type);
|
||||
|
||||
List<Type> selectTypeList4Keeper(Type type);
|
||||
|
||||
List<Type> selectTypeList4Repair(Type type);
|
||||
|
||||
|
||||
/**
|
||||
* 查询物资类型列表 -- 并且查询当前节点的父级节点名称
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import java.util.List;
|
|||
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.material.ma.domain.PartType;
|
||||
import com.bonus.material.ma.domain.vo.MaTypeVo;
|
||||
|
||||
/**
|
||||
* 配件类型管理Service接口
|
||||
|
|
@ -66,4 +67,8 @@ public interface IPartTypeService
|
|||
* @return
|
||||
*/
|
||||
List<PartType> getTypeList(PartType partType);
|
||||
|
||||
List<Integer> selectParentId(PartType partType);
|
||||
|
||||
List<PartType> getListByParentId(Long id, PartType type);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,6 +44,10 @@ public interface ITypeService {
|
|||
*/
|
||||
List<Type> selectTypeList(Type type);
|
||||
|
||||
List<Type> selectTypeList4Keeper(Type type);
|
||||
|
||||
List<Type> selectTypeList4Repair(Type type);
|
||||
|
||||
List<MaTypeVo> selectTypeListAndParentInfo(Type type);
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ import com.bonus.common.biz.enums.HttpCodeEnum;
|
|||
import com.bonus.common.core.utils.DateUtils;
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.common.security.utils.SecurityUtils;
|
||||
import com.bonus.material.ma.domain.vo.MaTypeVo;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
|
@ -183,4 +184,13 @@ public class PartTypeServiceImpl implements IPartTypeService
|
|||
return partTypeMapper.getTypeList(partType);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Integer> selectParentId(PartType partType) {
|
||||
return partTypeMapper.selectParentId(partType);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PartType> getListByParentId(Long id, PartType type) {
|
||||
return partTypeMapper.getListByTypeName(id, type);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -48,7 +48,6 @@ public class SupplierInfoServiceImpl implements ISupplierInfoService {
|
|||
BmFileInfo bmFileInfo = new BmFileInfo();
|
||||
bmFileInfo.setModelId(supplierInfo.getSupplierId());
|
||||
bmFileInfo.setTaskType(MaterialConstants.TASK_TYPE_WUZI_CHANGJIA);
|
||||
bmFileInfo.setFileType(MaterialConstants.FILE_TYPE_YINGYEZHIZHAO);
|
||||
List<BmFileInfo> fileInfos = bmFileInfoMapper.selectBmFileInfoList(bmFileInfo);
|
||||
supplierInfo.setBmFileInfos(fileInfos);
|
||||
return supplierInfo;
|
||||
|
|
@ -110,7 +109,6 @@ public class SupplierInfoServiceImpl implements ISupplierInfoService {
|
|||
BmFileInfo bmFileInfoToDelete = new BmFileInfo();
|
||||
bmFileInfoToDelete.setModelId(supplierInfo.getSupplierId());
|
||||
bmFileInfoToDelete.setTaskType(MaterialConstants.TASK_TYPE_WUZI_CHANGJIA);
|
||||
bmFileInfoToDelete.setFileType(MaterialConstants.FILE_TYPE_YINGYEZHIZHAO);
|
||||
bmFileInfoMapper.deleteBmFileInfoByBizInfo(bmFileInfoToDelete);
|
||||
if (CollectionUtils.isEmpty(supplierInfo.getBmFileInfos())) {
|
||||
return AjaxResult.success("修改任务成功,无营业执照附件");
|
||||
|
|
@ -143,7 +141,6 @@ public class SupplierInfoServiceImpl implements ISupplierInfoService {
|
|||
bmFileInfoToDelete = new BmFileInfo();
|
||||
bmFileInfoToDelete.setModelId(supplierIds[i]);
|
||||
bmFileInfoToDelete.setTaskType(MaterialConstants.TASK_TYPE_WUZI_CHANGJIA);
|
||||
bmFileInfoToDelete.setFileType(MaterialConstants.FILE_TYPE_YINGYEZHIZHAO);
|
||||
bmFileInfoMapper.deleteBmFileInfoByBizInfo(bmFileInfoToDelete);
|
||||
}
|
||||
return supplierInfoMapper.deleteSupplierInfoBySupplierIds(supplierIds);
|
||||
|
|
|
|||
|
|
@ -132,6 +132,48 @@ public class TypeServiceImpl implements ITypeService {
|
|||
return typeMapper.selectTypeList(type);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询物资类型管理列表(库管员)
|
||||
*
|
||||
* @param type 物资类型管理(库管员)
|
||||
* @return 物资类型管理(库管员)
|
||||
*/
|
||||
@Override
|
||||
public List<Type> selectTypeList4Keeper(Type type) {
|
||||
if (type != null ) {
|
||||
if (StringUtils.isEmpty(type.getDelFlag())) {
|
||||
// 如果没赋值,则默认查询正常数据状态
|
||||
type.setDelFlag(String.valueOf(DataCodeEnum.NORMAL.getCode()));
|
||||
}
|
||||
// 如果是顶级节点,则查询所有子节点
|
||||
if ("0".equals(type.getLevel())) {
|
||||
type.setLevel(null);
|
||||
}
|
||||
}
|
||||
return typeMapper.selectTypeList4Keeper(type);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询物资类型管理列表(维修员)
|
||||
*
|
||||
* @param type 物资类型管理(维修员)
|
||||
* @return 物资类型管理(维修员)
|
||||
*/
|
||||
@Override
|
||||
public List<Type> selectTypeList4Repair(Type type) {
|
||||
if (type != null ) {
|
||||
if (StringUtils.isEmpty(type.getDelFlag())) {
|
||||
// 如果没赋值,则默认查询正常数据状态
|
||||
type.setDelFlag(String.valueOf(DataCodeEnum.NORMAL.getCode()));
|
||||
}
|
||||
// 如果是顶级节点,则查询所有子节点
|
||||
if ("0".equals(type.getLevel())) {
|
||||
type.setLevel(null);
|
||||
}
|
||||
}
|
||||
return typeMapper.selectTypeList4Repair(type);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询物资类型管理列表 -- 并获取父级信息
|
||||
*
|
||||
|
|
|
|||
|
|
@ -84,9 +84,9 @@ public class PurchaseCheckInfoController extends BaseController {
|
|||
@RequiresPermissions("purchase:info:edit")
|
||||
@SysLog(title = "新购验收任务", businessType = OperaType.UPDATE, module = "物资新购->修改新购验收任务")
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody PurchaseCheckInfo purchaseCheckInfo) {
|
||||
public AjaxResult edit(@RequestBody PurchaseCheckDto purchaseCheckDto) {
|
||||
try {
|
||||
return toAjax(purchaseCheckInfoService.updatePurchaseCheckInfo(purchaseCheckInfo));
|
||||
return toAjax(purchaseCheckInfoService.updatePurchaseCheckInfo(purchaseCheckDto));
|
||||
} catch (Exception e) {
|
||||
return error("系统错误, " + e.getMessage());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ public class PurchaseNoticePersonController extends BaseController {
|
|||
* 查询新购短信通知人员列表
|
||||
*/
|
||||
@ApiOperation(value = "查询新购短信通知人员列表")
|
||||
@RequiresPermissions("purchase:person:list")
|
||||
@RequiresPermissions("purchase:person:notice")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(PurchaseNoticePerson purchaseNoticePerson) {
|
||||
List<PurchaseNoticePerson> list = purchaseNoticePersonService.selectPurchaseNoticePersonList(purchaseNoticePerson);
|
||||
|
|
@ -56,7 +56,7 @@ public class PurchaseNoticePersonController extends BaseController {
|
|||
* 查询新购短信通知人员列表
|
||||
*/
|
||||
@ApiOperation(value = "查询等待选择的新购短信通知人员列表")
|
||||
@RequiresPermissions("purchase:person:list")
|
||||
@RequiresPermissions("purchase:person:notice")
|
||||
@GetMapping("/listUnSelected")
|
||||
public TableDataInfo listUnSelected() {
|
||||
List<PurchaseNoticePerson> list = purchaseNoticePersonService.getUnSelectedUserList();
|
||||
|
|
@ -68,7 +68,7 @@ public class PurchaseNoticePersonController extends BaseController {
|
|||
*/
|
||||
@ApiOperation(value = "导出新购短信通知人员列表")
|
||||
@PreventRepeatSubmit
|
||||
@RequiresPermissions("purchase:person:export")
|
||||
@RequiresPermissions("purchase:person:notice")
|
||||
@SysLog(title = "新购短信通知人员", businessType = OperaType.EXPORT, module = "物资新购->导出新购短信通知人员")
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, PurchaseNoticePerson purchaseNoticePerson) {
|
||||
|
|
@ -81,7 +81,7 @@ public class PurchaseNoticePersonController extends BaseController {
|
|||
* 获取新购短信通知人员详细信息
|
||||
*/
|
||||
@ApiOperation(value = "获取新购短信通知人员详细信息")
|
||||
@RequiresPermissions("purchase:person:query")
|
||||
@RequiresPermissions("purchase:person:notice")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||
return success(purchaseNoticePersonService.selectPurchaseNoticePersonById(id));
|
||||
|
|
@ -92,7 +92,7 @@ public class PurchaseNoticePersonController extends BaseController {
|
|||
*/
|
||||
@ApiOperation(value = "新增新购短信通知人员")
|
||||
@PreventRepeatSubmit
|
||||
@RequiresPermissions("purchase:person:add")
|
||||
@RequiresPermissions("purchase:person:notice")
|
||||
@SysLog(title = "新购短信通知人员", businessType = OperaType.INSERT, module = "物资新购->新增新购短信通知人员")
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody PurchaseNoticePerson purchaseNoticePerson) {
|
||||
|
|
@ -108,7 +108,7 @@ public class PurchaseNoticePersonController extends BaseController {
|
|||
*/
|
||||
@ApiOperation(value = "批量新增新购短信通知人员")
|
||||
@PreventRepeatSubmit
|
||||
@RequiresPermissions("purchase:person:add")
|
||||
@RequiresPermissions("purchase:person:notice")
|
||||
@SysLog(title = "批量新增新购短信通知人员", businessType = OperaType.INSERT, module = "物资新购->批量新增新购短信通知人员")
|
||||
@PostMapping("/batchAddNoticePerson")
|
||||
public AjaxResult batchAddNoticePerson(@RequestBody List<PurchaseNoticePerson> purchaseNoticePersonList) {
|
||||
|
|
@ -124,7 +124,7 @@ public class PurchaseNoticePersonController extends BaseController {
|
|||
*/
|
||||
@ApiOperation(value = "批量发送短信")
|
||||
@PreventRepeatSubmit
|
||||
@RequiresPermissions("purchase:person:edit")
|
||||
@RequiresPermissions("purchase:person:notice")
|
||||
@SysLog(title = "批量发送短信", businessType = OperaType.UPDATE, module = "物资新购->批量发送短信")
|
||||
@PutMapping("/batchSendSms")
|
||||
public AjaxResult batchSendSms(@NotNull @Valid @RequestBody PurchaseNoticePersonDto purchaseNoticePersonDto) {
|
||||
|
|
@ -136,7 +136,7 @@ public class PurchaseNoticePersonController extends BaseController {
|
|||
*/
|
||||
@ApiOperation(value = "修改新购短信通知人员")
|
||||
@PreventRepeatSubmit
|
||||
@RequiresPermissions("purchase:person:edit")
|
||||
@RequiresPermissions("purchase:person:notice")
|
||||
@SysLog(title = "新购短信通知人员", businessType = OperaType.UPDATE, module = "物资新购->修改新购短信通知人员")
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody PurchaseNoticePerson purchaseNoticePerson) {
|
||||
|
|
@ -152,7 +152,7 @@ public class PurchaseNoticePersonController extends BaseController {
|
|||
*/
|
||||
@ApiOperation(value = "删除新购短信通知人员")
|
||||
@PreventRepeatSubmit
|
||||
@RequiresPermissions("purchase:person:remove")
|
||||
@RequiresPermissions("purchase:person:notice")
|
||||
@SysLog(title = "新购短信通知人员", businessType = OperaType.DELETE, module = "物资新购->删除新购短信通知人员")
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
|
|
|
|||
|
|
@ -2,6 +2,9 @@ package com.bonus.material.purchase.domain;
|
|||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.bonus.material.basic.domain.BmFileInfo;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.bonus.common.core.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
|
@ -134,5 +137,12 @@ public class PurchaseCheckDetails extends BaseEntity {
|
|||
@ApiModelProperty(value = "数据所属组织")
|
||||
private Long companyId;
|
||||
|
||||
/** 是否是固定资产编号(0 否,1 是) */
|
||||
@ApiModelProperty(value = "是否是固定资产编号(0 否,1 是)")
|
||||
private String fixCode;
|
||||
|
||||
/** 验收附件列表 */
|
||||
@Excel(name = "验收附件列表")
|
||||
@ApiModelProperty(value = "验收附件列表")
|
||||
private List<BmFileInfo> bmFileInfos;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -74,8 +74,8 @@ public class PurchaseDto {
|
|||
@ApiModelProperty(value = "提交绑定数据集合")
|
||||
private List<PurchaseDto> dtoList;
|
||||
|
||||
/** 是否是固定资产编号(0,是 1,否) */
|
||||
@ApiModelProperty(value = "是否是固定资产编号(0,是 1,否)")
|
||||
/** 是否是固定资产编号(0 否,1 是) */
|
||||
@ApiModelProperty(value = "是否是固定资产编号(0 否,1 是)")
|
||||
private String fixCode;
|
||||
|
||||
/** 编号类型 */
|
||||
|
|
|
|||
|
|
@ -53,10 +53,10 @@ public interface IPurchaseCheckInfoService {
|
|||
/**
|
||||
* 修改新购验收任务
|
||||
*
|
||||
* @param purchaseCheckInfo 新购验收任务
|
||||
* @param purchaseCheckDto 新购验收任务
|
||||
* @return 结果
|
||||
*/
|
||||
int updatePurchaseCheckInfo(PurchaseCheckInfo purchaseCheckInfo);
|
||||
boolean updatePurchaseCheckInfo(PurchaseCheckDto purchaseCheckDto);
|
||||
|
||||
/**
|
||||
* 批量删除新购验收任务
|
||||
|
|
|
|||
|
|
@ -12,6 +12,9 @@ import java.util.stream.Collectors;
|
|||
import com.bonus.common.core.exception.ServiceException;
|
||||
import com.bonus.common.core.utils.DateUtils;
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.common.security.utils.SecurityUtils;
|
||||
import com.bonus.material.basic.domain.BmFileInfo;
|
||||
import com.bonus.material.basic.mapper.BmFileInfoMapper;
|
||||
import com.bonus.material.purchase.config.PurchaseTaskEnum;
|
||||
import com.bonus.material.purchase.domain.PurchaseCheckDetails;
|
||||
import com.bonus.material.purchase.domain.dto.PurchaseCheckDto;
|
||||
|
|
@ -29,6 +32,7 @@ import com.bonus.material.purchase.service.IPurchaseCheckInfoService;
|
|||
import org.springframework.transaction.PlatformTransactionManager;
|
||||
import org.springframework.transaction.TransactionStatus;
|
||||
import org.springframework.transaction.support.DefaultTransactionDefinition;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
|
|
@ -54,6 +58,9 @@ public class PurchaseCheckInfoServiceImpl implements IPurchaseCheckInfoService {
|
|||
@Resource
|
||||
private TmTaskMapper tmTaskMapper;
|
||||
|
||||
@Resource
|
||||
BmFileInfoMapper bmFileInfoMapper;
|
||||
|
||||
/**
|
||||
* 查询新购验收任务
|
||||
*
|
||||
|
|
@ -160,6 +167,7 @@ public class PurchaseCheckInfoServiceImpl implements IPurchaseCheckInfoService {
|
|||
public AjaxResult insertPurchaseCheckInfo(PurchaseCheckDto purchaseCheckInfo) {
|
||||
// 赋值创建时间
|
||||
purchaseCheckInfo.getPurchaseCheckInfo().setCreateTime(DateUtils.getNowDate());
|
||||
purchaseCheckInfo.getPurchaseCheckInfo().setCreateBy(SecurityUtils.getLoginUser().getUsername());
|
||||
try {
|
||||
// 查询新购任务当月最大单号
|
||||
Integer thisMonthMaxOrder = tmTaskMapper.getMonthMaxOrderByDate(DateUtils.getCurrentYear(), DateUtils.getCurrentMonth(), Long.valueOf(PurchaseTaskEnum.PURCHASE_TASK_STATUS_WAIT_NOTICE.getTaskTypeId()));
|
||||
|
|
@ -188,6 +196,17 @@ public class PurchaseCheckInfoServiceImpl implements IPurchaseCheckInfoService {
|
|||
});
|
||||
// 批量插入详情数据
|
||||
boolean purchaseCheckDetailsListAddResult = purchaseCheckDetailsMapper.insertPurchaseCheckDetailsList(purchaseCheckInfo.getPurchaseCheckDetailsList()) > 0;
|
||||
|
||||
// 批量插入附件列表
|
||||
List<PurchaseCheckDetails> purchaseCheckDetailsList = purchaseCheckInfo.getPurchaseCheckDetailsList();
|
||||
for (PurchaseCheckDetails purchaseCheckDetails : purchaseCheckDetailsList) {
|
||||
List<BmFileInfo> bmFileInfos = purchaseCheckDetails.getBmFileInfos();
|
||||
if (!CollectionUtils.isEmpty(bmFileInfos)) {
|
||||
bmFileInfos.stream().forEach(o -> o.setTaskId(taskId));
|
||||
bmFileInfoMapper.insertBmFileInfos(bmFileInfos);
|
||||
}
|
||||
}
|
||||
|
||||
if (purchaseCheckDetailsListAddResult) {
|
||||
transactionManager.commit(transactionStatus);
|
||||
return AjaxResult.success("新增任务成功");
|
||||
|
|
@ -283,14 +302,20 @@ public class PurchaseCheckInfoServiceImpl implements IPurchaseCheckInfoService {
|
|||
/**
|
||||
* 修改新购验收任务
|
||||
*
|
||||
* @param purchaseCheckInfo 新购验收任务
|
||||
* @param purchaseCheckDto 新购验收任务
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updatePurchaseCheckInfo(PurchaseCheckInfo purchaseCheckInfo) {
|
||||
purchaseCheckInfo.setUpdateTime(DateUtils.getNowDate());
|
||||
public boolean updatePurchaseCheckInfo(PurchaseCheckDto purchaseCheckDto) {
|
||||
purchaseCheckDto.getPurchaseCheckInfo().setUpdateTime(DateUtils.getNowDate());
|
||||
purchaseCheckDto.getPurchaseCheckInfo().setUpdateBy(SecurityUtils.getUsername());
|
||||
try {
|
||||
return purchaseCheckInfoMapper.updatePurchaseCheckInfo(purchaseCheckInfo);
|
||||
List<PurchaseCheckDetails> purchaseCheckDetailsList = purchaseCheckDto.getPurchaseCheckDetailsList();
|
||||
for (PurchaseCheckDetails purchaseCheckDetails : purchaseCheckDetailsList) {
|
||||
purchaseCheckDetailsMapper.updatePurchaseCheckDetails(purchaseCheckDetails);
|
||||
}
|
||||
purchaseCheckInfoMapper.updatePurchaseCheckInfo(purchaseCheckDto.getPurchaseCheckInfo());
|
||||
return true;
|
||||
} catch (Exception e) {
|
||||
throw new ServiceException("错误信息描述");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<resultMap type="com.bonus.material.basic.domain.BmFileInfo" id="BmFileInfoResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="taskType" column="task_type" />
|
||||
<result property="taskId" column="task_id" />
|
||||
<result property="modelId" column="model_id" />
|
||||
<result property="name" column="name" />
|
||||
<result property="url" column="url" />
|
||||
|
|
@ -15,17 +16,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</resultMap>
|
||||
|
||||
<sql id="selectBmFileInfoVo">
|
||||
select id, task_type, model_id, name, url, file_type, create_by, create_time from bm_file_info
|
||||
select id, task_type, task_id, model_id, name, url, file_type, create_by, create_time from bm_file_info
|
||||
</sql>
|
||||
|
||||
<select id="selectBmFileInfoList" parameterType="com.bonus.material.basic.domain.BmFileInfo" resultMap="BmFileInfoResult">
|
||||
<include refid="selectBmFileInfoVo"/>
|
||||
<where>
|
||||
<if test="taskType != null "> and task_type = #{taskType}</if>
|
||||
<if test="taskId != null "> and task_id = #{taskId}</if>
|
||||
<if test="modelId != null "> and model_id = #{modelId}</if>
|
||||
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||||
<if test="url != null and url != ''"> and url = #{url}</if>
|
||||
<if test="fileType != null "> and file_type = #{fileType}</if>
|
||||
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
|
@ -38,6 +41,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
insert into bm_file_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="taskType != null">task_type,</if>
|
||||
<if test="taskId != null">task_id,</if>
|
||||
<if test="modelId != null">model_id,</if>
|
||||
<if test="name != null">name,</if>
|
||||
<if test="url != null">url,</if>
|
||||
|
|
@ -47,6 +51,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="taskType != null">#{taskType},</if>
|
||||
<if test="taskId != null">#{taskId},</if>
|
||||
<if test="modelId != null">#{modelId},</if>
|
||||
<if test="name != null">#{name},</if>
|
||||
<if test="url != null">#{url},</if>
|
||||
|
|
@ -56,10 +61,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</trim>
|
||||
</insert>
|
||||
|
||||
<insert id="insertBmFileInfos" parameterType="com.bonus.material.basic.domain.BmFileInfo">
|
||||
INSERT INTO bm_file_info(task_type,task_id,model_id,name,url,file_type,create_by,create_time)
|
||||
VALUES
|
||||
<foreach collection="list" item="item" index="index" separator=",">
|
||||
(#{item.taskType},
|
||||
#{item.taskId},
|
||||
#{item.modelId},
|
||||
#{item.name},
|
||||
#{item.url},
|
||||
#{item.fileType},
|
||||
#{item.createBy},
|
||||
#{item.createTime})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<update id="updateBmFileInfo" parameterType="com.bonus.material.basic.domain.BmFileInfo">
|
||||
update bm_file_info
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="taskType != null">task_type = #{taskType},</if>
|
||||
<if test="taskId != null">task_id = #{taskId},</if>
|
||||
<if test="modelId != null">model_id = #{modelId},</if>
|
||||
<if test="name != null">name = #{name},</if>
|
||||
<if test="url != null">url = #{url},</if>
|
||||
|
|
@ -85,6 +106,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
delete from bm_file_info
|
||||
<where>
|
||||
<if test="taskType != null "> and task_type = #{taskType}</if>
|
||||
<if test="taskId != null "> and task_id = #{taskId}</if>
|
||||
<if test="modelId != null "> and model_id = #{modelId}</if>
|
||||
<if test="fileType != null "> and file_type = #{fileType}</if>
|
||||
</where>
|
||||
|
|
|
|||
|
|
@ -151,4 +151,46 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
update ma_part_type set del_flag = '2' where pa_id = #{id}
|
||||
</delete>
|
||||
|
||||
<select id="selectParentId" resultType="java.lang.Integer">
|
||||
SELECT DISTINCT
|
||||
mt2.pa_id
|
||||
FROM
|
||||
ma_part_type mt
|
||||
LEFT JOIN ma_part_type mt2 ON mt.parent_id = mt2.pa_id
|
||||
LEFT JOIN ma_part_type mt3 ON mt2.parent_id = mt3.pa_id
|
||||
<where>
|
||||
<if test="level == 0">
|
||||
and mt.level = 4
|
||||
</if>
|
||||
<if test="level == 1">
|
||||
and mt3.pa_id = #{id}
|
||||
</if>
|
||||
<if test="level == 2">
|
||||
and mt2.pa_id = #{id}
|
||||
</if>
|
||||
and mt2.pa_id is not null
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="getListByTypeName" resultType="com.bonus.material.ma.domain.PartType">
|
||||
SELECT DISTINCT
|
||||
m.pa_id AS id,
|
||||
m.pa_name AS paName,
|
||||
m.parent_id as parentId,
|
||||
m.LEVEL as level,
|
||||
m.remark as remark
|
||||
FROM
|
||||
ma_part_type m
|
||||
LEFT JOIN ma_part_type m1 ON m.parent_id = m1.pa_id
|
||||
and m1.del_flag = '0'
|
||||
LEFT JOIN ma_part_type m2 ON m1.parent_id = m2.pa_id
|
||||
and m2.del_flag = '0'
|
||||
WHERE m.parent_id = #{paId} and m.del_flag = '0'
|
||||
<if test="type.keyword != null and type.keyword !=''">
|
||||
AND (m.pa_name like concat('%',#{type.keyword},'%')
|
||||
or m1.pa_name like concat('%',#{type.keyword},'%')
|
||||
or m2.pa_name like concat('%',#{type.keyword},'%')
|
||||
)
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
@ -8,7 +8,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="typeId" column="type_id" />
|
||||
<result property="typeName" column="type_name" />
|
||||
<result property="parentId" column="parent_id" />
|
||||
<result property="keeperNickName" column="keeper_nick_name" />
|
||||
<result property="repairNickName" column="repair_nick_name" />
|
||||
<result property="houseId" column="house_id" />
|
||||
<result property="houseName" column="house_name" />
|
||||
<result property="storageNum" column="storage_num" />
|
||||
<result property="typeCode" column="type_code" />
|
||||
<result property="modelCode" column="model_code" />
|
||||
|
|
@ -99,31 +102,55 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</sql>
|
||||
|
||||
<select id="selectTypeList" parameterType="com.bonus.material.ma.domain.Type" resultMap="TypeResult">
|
||||
<include refid="selectTypeVo"/>
|
||||
<where>
|
||||
<if test="typeName != null and typeName != ''"> and type_name like concat('%', #{typeName}, '%')</if>
|
||||
<if test="parentId != null and parentId != '0' "> and parent_id = #{parentId}</if>
|
||||
<if test="storageNum != null "> and storage_num = #{storageNum}</if>
|
||||
<if test="typeCode != null and typeCode != ''"> and type_code = #{typeCode}</if>
|
||||
<if test="modelCode != null and modelCode != ''"> and model_code = #{modelCode}</if>
|
||||
<if test="unitId != null "> and unit_id = #{unitId}</if>
|
||||
<if test="manageType != null and manageType != ''"> and manage_type = #{manageType}</if>
|
||||
<if test="leasePrice != null "> and lease_price = #{leasePrice}</if>
|
||||
<if test="effTime != null "> and eff_time = #{effTime}</if>
|
||||
<if test="rentPrice != null "> and rent_price = #{rentPrice}</if>
|
||||
<if test="buyPrice != null "> and buy_price = #{buyPrice}</if>
|
||||
<if test="payRatio != null "> and pay_ratio = #{payRatio}</if>
|
||||
<if test="level != null and level != ''"> and `level` = #{level}</if>
|
||||
<if test="ratedLoad != null and ratedLoad != ''"> and rated_load = #{ratedLoad}</if>
|
||||
<if test="testLoad != null and testLoad != ''"> and test_load = #{testLoad}</if>
|
||||
<if test="holdingTime != null "> and holding_time = #{holdingTime}</if>
|
||||
<if test="warnNum != null "> and warn_num = #{warnNum}</if>
|
||||
<if test="isPlan != null and isPlan != ''"> and is_plan = #{isPlan}</if>
|
||||
<if test="isAncuo != null and isAncuo != ''"> and is_ancuo = #{isAncuo}</if>
|
||||
<if test="facModel != null and facModel != ''"> and fac_model = #{facModel}</if>
|
||||
<if test="intelligentCode != null and intelligentCode != ''"> and intelligent_code = #{intelligentCode}</if>
|
||||
and del_flag = #{delFlag}
|
||||
</where>
|
||||
select
|
||||
mt4.type_id, mt4.type_name, mt4.parent_id, mt4.storage_num, mt4.type_code, mt4.model_code, mt4.unit_id, mt4.unit_name, mt4.manage_type, mt4.lease_price,
|
||||
mt4.eff_time, mt4.rent_price, mt4.buy_price, mt4.pay_ratio, mt4.pay_price, mt4.tax_ratio, mt4.level, mt4.rated_load, mt4.test_load, mt4.holding_time, mt4.warn_num,
|
||||
mt4.create_by, mt4.create_time, mt4.update_by, mt4.update_time, mt4.is_plan,mt4.is_ancuo, mt4.remark, mt4.fac_model, mt4.intelligent_code, whs.house_id, whi.house_name
|
||||
from ma_type mt4
|
||||
left join ma_type mt3 on mt3.type_id=mt4.parent_id
|
||||
left join ma_type mt2 on mt2.type_id=mt3.parent_id
|
||||
left join ma_type mt1 on mt1.type_id=mt2.parent_id
|
||||
left join wh_house_set whs on mt1.type_id=whs.type_id
|
||||
left join wh_house_info whi on whs.house_id=whi.house_id
|
||||
where mt4.del_flag = 0 and mt4.level = 4
|
||||
|
||||
UNION
|
||||
|
||||
select
|
||||
mt3.type_id, mt3.type_name, mt3.parent_id, mt3.storage_num, mt3.type_code, mt3.model_code, mt3.unit_id, mt3.unit_name, mt3.manage_type, mt3.lease_price,
|
||||
mt3.eff_time, mt3.rent_price, mt3.buy_price, mt3.pay_ratio, mt3.pay_price, mt3.tax_ratio, mt3.level, mt3.rated_load, mt3.test_load, mt3.holding_time, mt3.warn_num,
|
||||
mt3.create_by, mt3.create_time, mt3.update_by, mt3.update_time, mt3.is_plan,mt3.is_ancuo, mt3.remark, mt3.fac_model, mt3.intelligent_code, whs.house_id, whi.house_name
|
||||
from ma_type mt3
|
||||
left join ma_type mt2 on mt2.type_id=mt3.parent_id
|
||||
left join ma_type mt1 on mt1.type_id=mt2.parent_id
|
||||
left join wh_house_set whs on mt1.type_id=whs.type_id
|
||||
left join wh_house_info whi on whs.house_id=whi.house_id
|
||||
where mt3.del_flag = 0 and mt3.level = 3
|
||||
|
||||
UNION
|
||||
|
||||
select
|
||||
mt2.type_id, mt2.type_name, mt2.parent_id, mt2.storage_num, mt2.type_code, mt2.model_code, mt2.unit_id, mt2.unit_name, mt2.manage_type, mt2.lease_price,
|
||||
mt2.eff_time, mt2.rent_price, mt2.buy_price, mt2.pay_ratio, mt2.pay_price, mt2.tax_ratio, mt2.level, mt2.rated_load, mt2.test_load, mt2.holding_time, mt2.warn_num,
|
||||
mt2.create_by, mt2.create_time, mt2.update_by, mt2.update_time, mt2.is_plan,mt2.is_ancuo, mt2.remark, mt2.fac_model, mt2.intelligent_code, whs.house_id, whi.house_name
|
||||
from ma_type mt2
|
||||
left join ma_type mt1 on mt1.type_id=mt2.parent_id
|
||||
left join wh_house_set whs on mt1.type_id=whs.type_id
|
||||
left join wh_house_info whi on whs.house_id=whi.house_id
|
||||
where mt2.del_flag = 0 and mt2.level = 2
|
||||
|
||||
UNION
|
||||
|
||||
select
|
||||
mt1.type_id, mt1.type_name, mt1.parent_id, mt1.storage_num, mt1.type_code, mt1.model_code, mt1.unit_id, mt1.unit_name, mt1.manage_type, mt1.lease_price,
|
||||
mt1.eff_time, mt1.rent_price, mt1.buy_price, mt1.pay_ratio, mt1.pay_price, mt1.tax_ratio, mt1.level, mt1.rated_load, mt1.test_load, mt1.holding_time, mt1.warn_num,
|
||||
mt1.create_by, mt1.create_time, mt1.update_by, mt1.update_time, mt1.is_plan,mt1.is_ancuo, mt1.remark, mt1.fac_model, mt1.intelligent_code, whs.house_id, whi.house_name
|
||||
from ma_type mt1
|
||||
left join wh_house_set whs on mt1.type_id=whs.type_id
|
||||
left join wh_house_info whi on whs.house_id=whi.house_id
|
||||
where mt1.del_flag = 0 and mt1.level = 1
|
||||
|
||||
order by type_id
|
||||
</select>
|
||||
|
||||
<select id="selectTypeByTypeId" parameterType="Long" resultMap="TypeResult">
|
||||
|
|
@ -431,14 +458,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
select DISTINCT m.type_id, m.type_name, m.parent_id, m.unit_id, m.unit_name, m.manage_type,
|
||||
m.lease_price,m.eff_time, m.rent_price, m.buy_price, m.pay_price, m.level, m.rated_load, m.test_load,
|
||||
m.holding_time, m.warn_num,
|
||||
mtk.user_id keeperUserId,
|
||||
su.nick_name keeperUserName, mpi.prop_name, m.del_flag, m.create_by, m.create_time,
|
||||
-- mtk.user_id keeperUserId,
|
||||
-- su.nick_name keeperUserName,
|
||||
mpi.prop_name, m.del_flag, m.create_by, m.create_time,
|
||||
m.remark,m.type_id id , m.type_name label
|
||||
from ma_type m
|
||||
left join ma_prop_set mps on m.type_id = mps.type_id and mps.`status`='0' and mps.del_flag='0'
|
||||
left join ma_prop_info mpi on mps.prop_id = mpi.prop_id and mpi.`status`='0' and mpi.del_flag='0'
|
||||
left join ma_type_keeper mtk on m.type_id = mtk.type_id
|
||||
left join sys_user su on mtk.user_id = su.user_id
|
||||
-- left join ma_type_keeper mtk on m.type_id = mtk.type_id
|
||||
-- left join sys_user su on mtk.user_id = su.user_id
|
||||
<where>
|
||||
m.del_flag = '0'
|
||||
<if test="typeName != null and typeName !=''">
|
||||
|
|
@ -503,13 +531,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
select
|
||||
mt4.type_id, mt4.type_name, mt4.parent_id, mt4.storage_num, mt4.type_code, mt4.model_code, mt4.unit_id, mt4.unit_name, mt4.manage_type, mt4.lease_price,
|
||||
mt4.eff_time, mt4.rent_price, mt4.buy_price, mt4.pay_ratio, mt4.pay_price, mt4.tax_ratio, mt4.level, mt4.rated_load, mt4.test_load, mt4.holding_time, mt4.warn_num,
|
||||
mt4.create_by, mt4.create_time, mt4.update_by, mt4.update_time, mt4.is_plan,mt4.is_ancuo, mt4.remark, mt4.fac_model, mt4.intelligent_code, whs.house_id, mtk.user_id
|
||||
mt4.create_by, mt4.create_time, mt4.update_by, mt4.update_time, mt4.is_plan,mt4.is_ancuo, mt4.remark, mt4.fac_model, mt4.intelligent_code, whs.house_id, whi.house_name,su.nick_name as keeper_nick_name
|
||||
from ma_type mt4
|
||||
left join ma_type mt3 on mt3.type_id=mt4.parent_id
|
||||
left join ma_type mt2 on mt2.type_id=mt3.parent_id
|
||||
left join ma_type mt1 on mt1.type_id=mt2.parent_id
|
||||
left join wh_house_set whs on mt1.type_id=whs.type_id
|
||||
left join wh_house_info whi on whs.house_id=whi.house_id
|
||||
left join ma_type_keeper mtk on mt4.type_id=mtk.type_id
|
||||
left join sys_user su on mtk.user_id=su.user_id
|
||||
where mt4.del_flag = 0 and mt4.level = 4
|
||||
|
||||
UNION
|
||||
|
|
@ -517,11 +547,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
select
|
||||
mt3.type_id, mt3.type_name, mt3.parent_id, mt3.storage_num, mt3.type_code, mt3.model_code, mt3.unit_id, mt3.unit_name, mt3.manage_type, mt3.lease_price,
|
||||
mt3.eff_time, mt3.rent_price, mt3.buy_price, mt3.pay_ratio, mt3.pay_price, mt3.tax_ratio, mt3.level, mt3.rated_load, mt3.test_load, mt3.holding_time, mt3.warn_num,
|
||||
mt3.create_by, mt3.create_time, mt3.update_by, mt3.update_time, mt3.is_plan,mt3.is_ancuo, mt3.remark, mt3.fac_model, mt3.intelligent_code, whs.house_id, null as user_id
|
||||
mt3.create_by, mt3.create_time, mt3.update_by, mt3.update_time, mt3.is_plan,mt3.is_ancuo, mt3.remark, mt3.fac_model, mt3.intelligent_code, whs.house_id, whi.house_name,null as keeper_nick_name
|
||||
from ma_type mt3
|
||||
left join ma_type mt2 on mt2.type_id=mt3.parent_id
|
||||
left join ma_type mt1 on mt1.type_id=mt2.parent_id
|
||||
left join wh_house_set whs on mt1.type_id=whs.type_id
|
||||
left join wh_house_info whi on whs.house_id=whi.house_id
|
||||
where mt3.del_flag = 0 and mt3.level = 3
|
||||
|
||||
UNION
|
||||
|
|
@ -529,10 +560,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
select
|
||||
mt2.type_id, mt2.type_name, mt2.parent_id, mt2.storage_num, mt2.type_code, mt2.model_code, mt2.unit_id, mt2.unit_name, mt2.manage_type, mt2.lease_price,
|
||||
mt2.eff_time, mt2.rent_price, mt2.buy_price, mt2.pay_ratio, mt2.pay_price, mt2.tax_ratio, mt2.level, mt2.rated_load, mt2.test_load, mt2.holding_time, mt2.warn_num,
|
||||
mt2.create_by, mt2.create_time, mt2.update_by, mt2.update_time, mt2.is_plan,mt2.is_ancuo, mt2.remark, mt2.fac_model, mt2.intelligent_code, whs.house_id, null as user_id
|
||||
mt2.create_by, mt2.create_time, mt2.update_by, mt2.update_time, mt2.is_plan,mt2.is_ancuo, mt2.remark, mt2.fac_model, mt2.intelligent_code, whs.house_id, whi.house_name, null as keeper_nick_name
|
||||
from ma_type mt2
|
||||
left join ma_type mt1 on mt1.type_id=mt2.parent_id
|
||||
left join wh_house_set whs on mt1.type_id=whs.type_id
|
||||
left join wh_house_info whi on whs.house_id=whi.house_id
|
||||
where mt2.del_flag = 0 and mt2.level = 2
|
||||
|
||||
UNION
|
||||
|
|
@ -540,9 +572,64 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
select
|
||||
mt1.type_id, mt1.type_name, mt1.parent_id, mt1.storage_num, mt1.type_code, mt1.model_code, mt1.unit_id, mt1.unit_name, mt1.manage_type, mt1.lease_price,
|
||||
mt1.eff_time, mt1.rent_price, mt1.buy_price, mt1.pay_ratio, mt1.pay_price, mt1.tax_ratio, mt1.level, mt1.rated_load, mt1.test_load, mt1.holding_time, mt1.warn_num,
|
||||
mt1.create_by, mt1.create_time, mt1.update_by, mt1.update_time, mt1.is_plan,mt1.is_ancuo, mt1.remark, mt1.fac_model, mt1.intelligent_code, whs.house_id, null as user_id
|
||||
mt1.create_by, mt1.create_time, mt1.update_by, mt1.update_time, mt1.is_plan,mt1.is_ancuo, mt1.remark, mt1.fac_model, mt1.intelligent_code, whs.house_id, whi.house_name,null as keeper_nick_name
|
||||
from ma_type mt1
|
||||
left join wh_house_set whs on mt1.type_id=whs.type_id
|
||||
left join wh_house_info whi on whs.house_id=whi.house_id
|
||||
where mt1.del_flag = 0 and mt1.level = 1
|
||||
|
||||
order by type_id
|
||||
</select>
|
||||
|
||||
<select id="selectTypeList4Repair" parameterType="com.bonus.material.ma.domain.Type" resultMap="TypeResult">
|
||||
select
|
||||
mt4.type_id, mt4.type_name, mt4.parent_id, mt4.storage_num, mt4.type_code, mt4.model_code, mt4.unit_id, mt4.unit_name, mt4.manage_type, mt4.lease_price,
|
||||
mt4.eff_time, mt4.rent_price, mt4.buy_price, mt4.pay_ratio, mt4.pay_price, mt4.tax_ratio, mt4.level, mt4.rated_load, mt4.test_load, mt4.holding_time, mt4.warn_num,
|
||||
mt4.create_by, mt4.create_time, mt4.update_by, mt4.update_time, mt4.is_plan,mt4.is_ancuo, mt4.remark, mt4.fac_model, mt4.intelligent_code, whs.house_id, whi.house_name,su.nick_name as repair_nick_name
|
||||
from ma_type mt4
|
||||
left join ma_type mt3 on mt3.type_id=mt4.parent_id
|
||||
left join ma_type mt2 on mt2.type_id=mt3.parent_id
|
||||
left join ma_type mt1 on mt1.type_id=mt2.parent_id
|
||||
left join wh_house_set whs on mt1.type_id=whs.type_id
|
||||
left join wh_house_info whi on whs.house_id=whi.house_id
|
||||
left join ma_type_repair mtr on mt4.type_id=mtr.type_id
|
||||
left join sys_user su on mtr.user_id=su.user_id
|
||||
where mt4.del_flag = 0 and mt4.level = 4
|
||||
|
||||
UNION
|
||||
|
||||
select
|
||||
mt3.type_id, mt3.type_name, mt3.parent_id, mt3.storage_num, mt3.type_code, mt3.model_code, mt3.unit_id, mt3.unit_name, mt3.manage_type, mt3.lease_price,
|
||||
mt3.eff_time, mt3.rent_price, mt3.buy_price, mt3.pay_ratio, mt3.pay_price, mt3.tax_ratio, mt3.level, mt3.rated_load, mt3.test_load, mt3.holding_time, mt3.warn_num,
|
||||
mt3.create_by, mt3.create_time, mt3.update_by, mt3.update_time, mt3.is_plan,mt3.is_ancuo, mt3.remark, mt3.fac_model, mt3.intelligent_code, whs.house_id, whi.house_name,null as repair_nick_name
|
||||
from ma_type mt3
|
||||
left join ma_type mt2 on mt2.type_id=mt3.parent_id
|
||||
left join ma_type mt1 on mt1.type_id=mt2.parent_id
|
||||
left join wh_house_set whs on mt1.type_id=whs.type_id
|
||||
left join wh_house_info whi on whs.house_id=whi.house_id
|
||||
where mt3.del_flag = 0 and mt3.level = 3
|
||||
|
||||
UNION
|
||||
|
||||
select
|
||||
mt2.type_id, mt2.type_name, mt2.parent_id, mt2.storage_num, mt2.type_code, mt2.model_code, mt2.unit_id, mt2.unit_name, mt2.manage_type, mt2.lease_price,
|
||||
mt2.eff_time, mt2.rent_price, mt2.buy_price, mt2.pay_ratio, mt2.pay_price, mt2.tax_ratio, mt2.level, mt2.rated_load, mt2.test_load, mt2.holding_time, mt2.warn_num,
|
||||
mt2.create_by, mt2.create_time, mt2.update_by, mt2.update_time, mt2.is_plan,mt2.is_ancuo, mt2.remark, mt2.fac_model, mt2.intelligent_code, whs.house_id, whi.house_name, null as repair_nick_name
|
||||
from ma_type mt2
|
||||
left join ma_type mt1 on mt1.type_id=mt2.parent_id
|
||||
left join wh_house_set whs on mt1.type_id=whs.type_id
|
||||
left join wh_house_info whi on whs.house_id=whi.house_id
|
||||
where mt2.del_flag = 0 and mt2.level = 2
|
||||
|
||||
UNION
|
||||
|
||||
select
|
||||
mt1.type_id, mt1.type_name, mt1.parent_id, mt1.storage_num, mt1.type_code, mt1.model_code, mt1.unit_id, mt1.unit_name, mt1.manage_type, mt1.lease_price,
|
||||
mt1.eff_time, mt1.rent_price, mt1.buy_price, mt1.pay_ratio, mt1.pay_price, mt1.tax_ratio, mt1.level, mt1.rated_load, mt1.test_load, mt1.holding_time, mt1.warn_num,
|
||||
mt1.create_by, mt1.create_time, mt1.update_by, mt1.update_time, mt1.is_plan,mt1.is_ancuo, mt1.remark, mt1.fac_model, mt1.intelligent_code, whs.house_id, whi.house_name,null as repair_nick_name
|
||||
from ma_type mt1
|
||||
left join wh_house_set whs on mt1.type_id=whs.type_id
|
||||
left join wh_house_info whi on whs.house_id=whi.house_id
|
||||
where mt1.del_flag = 0 and mt1.level = 1
|
||||
|
||||
order by type_id
|
||||
|
|
|
|||
|
|
@ -32,17 +32,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="fileName" column="file_name" />
|
||||
<result property="fileUrl" column="file_url" />
|
||||
<result property="companyId" column="company_id" />
|
||||
<result property="fixCode" column="fix_code" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectPurchaseCheckDetailsVo">
|
||||
select id, task_id, type_id, purchase_price, purchase_tax_price, purchase_num, check_num, bind_num, check_result, supplier_id, status, create_by, production_time, create_time, update_by, update_time, remark, check_url_name, check_url, input_num, input_status, input_time, file_name, file_url, company_id from purchase_check_details
|
||||
select id, task_id, type_id, purchase_price, purchase_tax_price, purchase_num, check_num, bind_num, check_result, supplier_id, status, create_by, production_time, create_time, update_by, update_time, remark, check_url_name, check_url, input_num, input_status, input_time, file_name, file_url, company_id, fix_code from purchase_check_details
|
||||
</sql>
|
||||
|
||||
<sql id="selectPurchaseCheckDetailsJoinVo">
|
||||
select pcd.id, pcd.task_id, pcd.type_id, pcd.purchase_price, pcd.purchase_tax_price, pcd.purchase_num, pcd.check_num, pcd.bind_num, pcd.check_result,
|
||||
pcd.supplier_id, pcd.status, pcd.create_by, pcd.production_time, pcd.create_time, pcd.update_by, pcd.update_time,
|
||||
pcd.remark, pcd.check_url_name, pcd.check_url, pcd.input_num, pcd.input_status, pcd.input_time, pcd.file_name,
|
||||
pcd.file_url, pcd.company_id, mt.type_name, mt.unit_name, mtp.type_name as ma_type_name
|
||||
pcd.file_url, pcd.company_id, pcd.fix_code, mt.type_name, mt.unit_name, mtp.type_name as ma_type_name
|
||||
from purchase_check_details pcd
|
||||
left join ma_type mt on pcd.type_id = mt.type_id
|
||||
left join ma_type mtp on mt.parent_id = mtp.type_id
|
||||
|
|
@ -70,6 +71,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="fileName != null and fileName != ''"> and file_name like concat('%', #{fileName}, '%')</if>
|
||||
<if test="fileUrl != null and fileUrl != ''"> and file_url = #{fileUrl}</if>
|
||||
<if test="companyId != null "> and company_id = #{companyId}</if>
|
||||
<if test="fixCode != null "> and fix_code = #{fixCode}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
|
@ -132,6 +134,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="fileName != null">file_name,</if>
|
||||
<if test="fileUrl != null">file_url,</if>
|
||||
<if test="companyId != null">company_id,</if>
|
||||
<if test="fixCode != null">fix_code,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="taskId != null">#{taskId},</if>
|
||||
|
|
@ -158,6 +161,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="fileName != null">#{fileName},</if>
|
||||
<if test="fileUrl != null">#{fileUrl},</if>
|
||||
<if test="companyId != null">#{companyId},</if>
|
||||
<if test="fixCode != null">#{fixCode},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
|
|
@ -188,6 +192,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="fileName != null">file_name = #{fileName},</if>
|
||||
<if test="fileUrl != null">file_url = #{fileUrl},</if>
|
||||
<if test="companyId != null">company_id = #{companyId},</if>
|
||||
<if test="fixCode != null">fix_code = #{fixCode},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
|
@ -227,14 +232,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
purchase_num,check_num,bind_num,check_result,supplier_id,
|
||||
status,production_time,create_by,create_time,update_by,
|
||||
update_time,remark,check_url_name,check_url,input_num,
|
||||
input_status,input_time,file_name,file_url,company_id)
|
||||
input_status,input_time,file_name,file_url,company_id,fix_code)
|
||||
values
|
||||
<foreach collection="list" item="item" index="index" separator=",">
|
||||
(#{item.taskId},#{item.typeId},#{item.purchasePrice},#{item.purchaseTaxPrice},
|
||||
#{item.purchaseNum},#{item.checkNum},#{item.bindNum},#{item.checkResult},#{item.supplierId},
|
||||
#{item.status},#{item.productionTime},#{item.createBy},#{item.createTime},#{item.updateBy},
|
||||
#{item.updateTime},#{item.remark},#{item.checkUrlName},#{item.checkUrl},#{item.inputNum},
|
||||
#{item.inputStatus},#{item.inputTime},#{item.fileName},#{item.fileUrl},#{item.companyId})
|
||||
#{item.inputStatus},#{item.inputTime},#{item.fileName},#{item.fileUrl},#{item.companyId},#{item.fixCode})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue