| | |
| | | import com.matrix.system.app.vo.ServiceOrderListVo; |
| | | import com.matrix.system.common.bean.BusParameterSettings; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.common.constance.AppConstance; |
| | | import com.matrix.system.common.dao.BusParameterSettingsDao; |
| | | import com.matrix.system.common.dao.SysUsersDao; |
| | | import com.matrix.system.constance.Dictionary; |
| | |
| | | if (!projServices.getState().equals(Dictionary.SERVICE_STATU_XPL)) { |
| | | throw new GlobleException("该服务单状态为" + projServices.getState() + ",不可以进行当前操作!"); |
| | | } |
| | | projServicesVo.setCompanyId(projServices.getCompanyId()); |
| | | if (isNeedOutStore(projServicesVo)) { |
| | | |
| | | // 生成出库单 |
| | |
| | | * @return |
| | | */ |
| | | private boolean isNeedOutStore(SysProjServices projServicesVo) { |
| | | |
| | | if (CollectionUtils.isNotEmpty(projServicesVo.getOutStoreItem())) { |
| | | BusParameterSettings manageStockSetting = busParameterSettingsDao.selectCompanyParamByCode(AppConstance.WAREHOUSE_MANAGE_STOCK, projServicesVo.getCompanyId()); |
| | | if(AppConstance.IS_Y.equals(manageStockSetting.getParamValue())){ |
| | | for (SysOutStoreItem item : projServicesVo.getOutStoreItem()) { |
| | | if (item.getAmount() != null && item.getAmount() > 0) { |
| | | return true; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | return false; |
| | | } |
| | | |