|
|
@ -3,15 +3,19 @@ package com.ruoyi.system.controller; |
|
|
|
import com.ruoyi.common.annotation.Log; |
|
|
|
import com.ruoyi.common.core.controller.BaseController; |
|
|
|
import com.ruoyi.common.core.domain.AjaxResult; |
|
|
|
import com.ruoyi.common.core.domain.entity.SysUser; |
|
|
|
import com.ruoyi.common.core.page.TableDataInfo; |
|
|
|
import com.ruoyi.common.enums.BusinessType; |
|
|
|
import com.ruoyi.common.utils.ShiroUtils; |
|
|
|
import com.ruoyi.common.utils.StringUtils; |
|
|
|
import com.ruoyi.common.utils.poi.ExcelUtil; |
|
|
|
import com.ruoyi.process.general.service.IProcessService; |
|
|
|
import com.ruoyi.system.domain.OutsourceQuoteChild; |
|
|
|
import com.ruoyi.system.domain.SysMakeorderPick; |
|
|
|
import com.ruoyi.system.domain.SysMakeorderPickVo; |
|
|
|
import com.ruoyi.system.mapper.SysMakeorderPickMapper; |
|
|
|
import com.ruoyi.system.service.ISysMakeorderPickService; |
|
|
|
import com.ruoyi.system.service.ISysUserService; |
|
|
|
import com.ruoyi.warehouse.service.IWarehouseOutOrderService; |
|
|
|
import org.activiti.engine.RuntimeService; |
|
|
|
import org.activiti.engine.TaskService; |
|
|
@ -56,6 +60,12 @@ public class SysMakeorderPickController extends BaseController |
|
|
|
@Autowired |
|
|
|
private IWarehouseOutOrderService warehouseOutOrderService; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private SysMakeorderPickMapper sysMakeorderPickMapper; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private ISysUserService sysUserService; |
|
|
|
|
|
|
|
@RequiresPermissions("system:makeorderpick:view") |
|
|
|
@GetMapping() |
|
|
|
public String makeorderpick(ModelMap mmap) |
|
|
@ -84,11 +94,18 @@ public class SysMakeorderPickController extends BaseController |
|
|
|
@Log(title = "生产领料单", businessType = BusinessType.EXPORT) |
|
|
|
@PostMapping("/export") |
|
|
|
@ResponseBody |
|
|
|
public AjaxResult export(SysMakeorderPickVo sysMakeorderPickVo) |
|
|
|
public AjaxResult export(SysMakeorderPickVo sysMakeorderPickVo,String ids) |
|
|
|
{ |
|
|
|
List<SysMakeorderPickVo> list = sysMakeorderPickService.selectSysMakeorderPickList(sysMakeorderPickVo); |
|
|
|
ExcelUtil<SysMakeorderPickVo> util = new ExcelUtil<SysMakeorderPickVo>(SysMakeorderPickVo.class); |
|
|
|
return util.exportExcel(list, "生产领料单数据"); |
|
|
|
if (org.springframework.util.StringUtils.isEmpty(ids)){ |
|
|
|
List<SysMakeorderPickVo> pickVoList = sysMakeorderPickMapper.selectSysMakeorderPickList(sysMakeorderPickVo); |
|
|
|
ExcelUtil<SysMakeorderPickVo> util = new ExcelUtil<SysMakeorderPickVo>(SysMakeorderPickVo.class); |
|
|
|
return util.exportExcel(pickVoList, "生产领料数据"); |
|
|
|
}else { |
|
|
|
String[] makeNos = ids.split(","); |
|
|
|
List<SysMakeorderPickVo> pickVoList = sysMakeorderPickMapper.selectSysMakeorderPickListByNos(makeNos); |
|
|
|
ExcelUtil<SysMakeorderPickVo> util = new ExcelUtil<SysMakeorderPickVo>(SysMakeorderPickVo.class); |
|
|
|
return util.exportExcel(pickVoList, ids); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
@ -110,7 +127,7 @@ public class SysMakeorderPickController extends BaseController |
|
|
|
public AjaxResult addSave(SysMakeorderPick sysMakeorderPick) |
|
|
|
{ |
|
|
|
if (StringUtils.isEmpty(sysMakeorderPick.getPickDetails())){ |
|
|
|
return AjaxResult.success(); |
|
|
|
return AjaxResult.error("领料子表数据为空!"); |
|
|
|
} |
|
|
|
// 审核状态-待审核
|
|
|
|
sysMakeorderPick.setAuditStatus("0"); |
|
|
@ -268,5 +285,11 @@ public class SysMakeorderPickController extends BaseController |
|
|
|
return toAjax(sysMakeorderPickService.restoreSysMakeorderPickById(id)); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@GetMapping("/getBinessMembers") |
|
|
|
@ResponseBody |
|
|
|
public TableDataInfo getBusinessMembers(){ |
|
|
|
startPage(); |
|
|
|
List<SysUser> list = sysUserService.selectRoleToUserList("scyRole,scjlRole,sczgRole,admin"); |
|
|
|
return getDataTable(list); |
|
|
|
} |
|
|
|
} |
|
|
|