| | |
| | | import com.consum.base.core.type.CategoryType; |
| | | import com.consum.base.core.type.StatesType; |
| | | import com.consum.base.core.type.TransferBusinessType; |
| | | import com.consum.base.core.type.TransferStatesType; |
| | | import com.consum.base.core.type.WareHouseType; |
| | | import com.consum.base.core.utils.CurrencyUtil; |
| | | import com.consum.base.core.utils.IdUtil; |
| | |
| | | // 入库仓库为当前用户的默认仓库中的第一个 |
| | | String tenantId = sysInfo.getTenantId(); |
| | | String tenantName = sysInfo.getTenantName(); |
| | | BaseWarehouse warehouse = baseWarehouseService.getDefaultWarehouseByAgencyId(Long.valueOf(tenantId)); |
| | | BaseWarehouse warehouse = baseWarehouseService.getWarehouseByAgencyId(Long.valueOf(tenantId), null); |
| | | if (warehouse == null) { |
| | | log.error("仓库不存在"); |
| | | throw new Exception("仓库不存在"); |
| | |
| | | lWhFormTransfer.setOperatorName(sysInfo.getUserName()); |
| | | lWhFormTransfer.setCreateTime(param.getCreateTime()); |
| | | // 0=待出库;1=待接收;2=已入库库:4=已撤销 |
| | | lWhFormTransfer.setStates(0); |
| | | lWhFormTransfer.setStates(TransferStatesType.OUT_PENDING.getValue()); |
| | | lWhFormTransfer.setProcureDoc(param.getProcureDoc()); |
| | | |
| | | int flag1 = this.insert(lWhFormTransfer); |
| | |
| | | */ |
| | | public int updateStatus(Long id) { |
| | | LWhFormTransfer lWhFormTransfer = new LWhFormTransfer(id); |
| | | lWhFormTransfer.setStates(4); |
| | | lWhFormTransfer.setStates(TransferStatesType.CANCEL.getValue()); |
| | | return this.update(lWhFormTransfer); |
| | | } |
| | | |
| | |
| | | } |
| | | if (param.getOutAgencyId() != null) { |
| | | sql.append("AND ft.OUT_AGENCY_ID like :outAgencyId "); |
| | | params.put("outAgencyId", param.getOutAgencyId()); |
| | | params.put("outAgencyId", param.getOutAgencyId() + StringUtils.CHAR_PERCENT); |
| | | } |
| | | if (param.getOutAgencyId() != null) { |
| | | if (param.getInAgencyId() != null) { |
| | | sql.append("AND ft.IN_AGENCY_ID like :inAgencyId "); |
| | | params.put("inAgencyId", param.getInAgencyId()); |
| | | params.put("inAgencyId", param.getInAgencyId() + StringUtils.CHAR_PERCENT); |
| | | } |
| | | if (StringUtils.isNotEmpty(param.getOperatorName())) { |
| | | sql.append("AND ft.OPERATOR_NAME = :operatorName "); |